Posts Learn Components Snippets Categories Tags Tools About
/

Best way to run Composer Update in Production

Learn the best practice on how to run composer update in a production environment to prevent code break

Created on Aug 13, 2021

755 views

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.

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

Load comments for Best way to run Composer Update in Production

)