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

enthusiast14's avatar

installing or moving laravel package to production site

Hi i am not thinking to install my own package in production laravel site using composer require commands because command line interface with composer may not be available for production laravel site in shared hosting. So, what i did is downloaded the laravel site and ran under localhost using xampp. then installed my own package using composer require command and package worked well with simple service providers added in app.php file too, then i moved all local laravel site files to production again. So, then package is running in production laravel site too. My question is am i missing any commands like "composer update", "composer install --optimize-autoloader --no-dev" locally after installing my package and before moving site files to production again?

0 likes
3 replies
vincent15000's avatar

Never update any package for an app in production, you could break some dependencies.

enthusiast14's avatar

@vincent15000 could you please elaborate how my scenario breaks any dependencies? i installed my package locally in my laravel app by composer require mypackagename ( FYI my package wasn't hosted in any online repositories, i just put it in a folder and showed the folder path in repositories tag in laravel app's composer file) then i just moved all laravel app's files to production again. If any problem then how u say to install the package in my laravel app? by issuing composer command directly in production app via ssh(using putty)?

enthusiast14's avatar

furthermore, when i run command via ssh in my laravel app at production hostinger shared hosting then at last i get composer memory limit error!. Anyways, in my scenario, after i installed my own package locally, i do see that only vendor/composer folder files updated with logical lines nothing wrong with it, and also some files added in vendor/bin folder, composer and composer lock file updated to include package details. So, there were no updates of any third-party packages in vendor folder, so when any dependencies break?

Please or to participate in this conversation.