Install Composer dependencies for production
composer install production | composer install without dev packages | rebuild vendor folder | composer | php | deploymentCaution: This command changes the system. Understand what it does before you run it.
composer install --no-dev --optimize-autoloader --working-dir=/var/www/vhosts/example.com/httpdocsInstalls exactly the versions pinned in composer.lock and leaves out packages from require-dev. The optimized autoloader generates a class map, which speeds up application startup. A typical step when deploying to a live server.
Note: Run it as the subscription user, not as root, so that vendor/ has the right owner. For a specific PHP version, put the interpreter in front, for example /opt/plesk/php/8.3/bin/php /usr/local/bin/composer.
Also searched as
- composer install production
- composer install without dev packages
- rebuild vendor folder