Home / Snippets / Best way to run Composer Update in Production
Best way to run Composer Update in Production cover

Best way to run Composer Update in Production

773

3 years ago

0 comments

The best way to update the composer dependency in production is by running "composer update" first on your local development. By doing so the "composer.lock" file will be updated and when you have a check for any breaking changes, it's time to push to the server and then run "composer install".

Below are the steps to do so:
  1. "composer update" on the local development.
  2. check for any breaking changes.
  3. commit the "composer.lock" file and push to git/production.
  4. run "composer install" from the production server.

By ensuring that everything is running fine in the local development, it will now be safe to run the command in the production environment.
notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this