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

MonsieurRado's avatar

Composer Install on production server

Hello, I am runnig a Laravel App and I would like to install a new dependency. My site is hosted by OVH. When I run the command php composer.phar Install in the root of the server , composer runs. But i would like to run this command in /www . The result is : Could not open input file: composer.phar

What am I missing? I know that i can't install Composer in www but only in the server root.

How could i do this ?

Thank you and sorry for my english.

0 likes
3 replies
Tray2's avatar
Tray2
Best Answer
Level 73

So look for the composer.phar file and then when you now where they placed it you go to your www directory and run

php <path to composer>/composer.phar install

Normally the composer. phar shoul be executable and be place in your path without the phar extension.

https://getcomposer.org/download/

bestmomo's avatar

Hello,

I don't understand why run command in /www, don't you use a console in SSH ?

MonsieurRado's avatar

Thankyou Tray2 and bestmomo for your answers!:

here the solution thks Tray2! :

php ../composer.phar

Please or to participate in this conversation.