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


2 years ago


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

Ahmad Aziz

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






Support Us

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

Post Tutorials

Learn trending tutorials for ReactJs, React Native, VueJS, NextJs, Laravel, Tailwind CSS, and Flutter development.
View Tutorials

Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that's right for your web projects
View Components

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this