1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Installing Composer on a Web host or a Cloud Server
Composer is an open source dependencies manager written in PHP.
It allows its users to register and install the libraries required by the main project.
Composer documentation: https://getcomposer.org/doc/
- Log in to your host via SSH (Find out more)
- In the terminal, enter the following command: cd ~
- Enter: mkdir .composer
- Enter: curl -sS https://getcomposer.org/installer | php -d allow_url_fopen=On
- Composer is now available on your hosting
Launch Composer anywhere
It is not possible to install Composer globally on the server (shared / Cloud). Nevertheless, once the above instructions have been followed, execute the following command in SSH to launch Composer anywhere:
"folderComposer" is to be changed by the absolute path of Composer (given during its installation).
If you wish to type "composer" instead of "composer.phar", you can rename the Composer file as follows, by placing yourself in SSH in the Composer folder:
For the change to remain after reconnecting in SSH, you must add it in SSH in your profile:
- create a .profile file if none exists: tap ~/.profile
- edit the .profile file:nano ~/.profile
- add the code to the interior of the file: export PATH=$PATH:/folderComposer
- load the .profile file: source ~/.profile