Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ccasselman's avatar

Recommended production deployment with "composer install"

I am new to using composer and was told to use composer install on the production boxes to make sure the production boxes match the latest and tested version of the packages.

However, how can you do a composer install on production boxes without the site going down? I have a process for all other folders that need to be deployed by the way I upload and put them in place with zero downtime and 100% reliable rollback.

So I ask... What is the proven ways to do deployments and rollbacks on things that require composer to get new packages. Of course this is assuming I am not copying up the whole vendor folder each time to handle it how I handle the other folders like app.

Thanks for your feedback

0 likes
4 replies
graham's avatar

Did you take a look at the new Laravel product envoyer? Sounds like it could be what you're looking for:

envoyer.io

1 like
aixguru's avatar

You could always deploy to a new folder (e.g. build_$timestamp) and then change symlinks to where your vhost points. I imagine that envoyer will work similarly. This give you plenty of time to run composer and do whatever tasks necessary without taking the previous build offline.

ccasselman's avatar

I'll see what envoyer.io has in store for us today - it seems perfect if it lives up to the documentation.

austenc's avatar

You can do it with a symlink-style deploy (what envoyer.io uses behind the scenes). While I won't get into the details of how that works here, you can check out Rocketeer if you're looking for more of a DIY solution. It's essentially a PHP version of Capistrano.

Please or to participate in this conversation.