How to install composer on Shared hosting environment?

Disclaimer: Accessing the information on this page means you agree to the Sites Privacy Policy & Terms of Use Agreement.

This article will assume you have CLI access through SSH of your server. If you don’t know what is that, You will need to learn how to use it before you proceed with this article. So here we go to use CLI on the server and navigate the steps …

Firstly, download the composer:

  1. Open the URL : and scroll down to the Manual download section on this website.
  2. Once you found out then right click and copy the link location.
  3. Now, navigate to your home directory’s bin folder ~/bin and if it is not there then create directory “bin”.
  4. Once you are in bin directory write down then copied url with wget command as below:
wget --no-check-certificate
  • Run the chmod 744 command to give permission to execute the file
chmod 744 composer.phar
  • Now create an alias to composer
    • Change the directories back to your home directory
    • Edit .bashrc file or might be .bashrc_profile file depending on your os structure
    • Create an alias to the composer.phar
alias composer='~/bin/composer.phar'
  • Reload the .bashrc file by issuing the source command
source .bashrc
  • Test the composer with version check command -> composer -V

This article is contributed by RootLinuxBlog. If you like RootLinuxBlog and would like to contribute, you can submit an article using contact us from. See your article appearing on the RootLinuxBlog main page and help other Techies.
Please write comments if you found any error with the above article would really help us to serve you a better way. Thank you…

How to install composer on Shared hosting environment?

Leave a Reply

Your email address will not be published. Required fields are marked *


Enjoy this blog? Please spread the word :)