Installing Composer for a Hosting Account

To install and use the Composer package manager, you’ll need access via SSH (instructions for installing)


  1. After installing, we go to the root folder of the account

cd /home/username

  1. You can download the latest version of the script on the project page in the Manual Download. 

We copy the link of the necessary version and download this version to the root folder of your account


  1. We rename the script and set the rights to be able to execute this script

mv composer.phar composer

chmod +x composer

  1. Next, we open .bashrc file to be able to edit. 

nano .bashrc

At the end of the file, we need to add a string and save changes, pressing (Ctrl+X keys, then Y and Enter):

alias composer="/home/username/composer"

Where username is your login on the server, the username to login cPanel.

For the changes to come into effect, we need to logout and connect again.

If composer doesn’t work, you need to go to cPanel, then to Choose PHP version and switch the suhosin module. This module blocks the work of many scripts with regard to security measures. If you see that the installed PHP version has the native mark, you need to choose the necessary version from the list and press Install as current.

Was this answer helpful? 0 Users Found This Useful (0 Votes)