Can I install the Composer tool for PHP?

If you write your own PHP scripts, you may want to use Composer, a “dependency management tool for PHP projects”.

While a full description of what Composer does and how to use it is outside the scope of this page, the instructions below explain one way that advanced users can install it using a shell connection.

These six lines should successfully install Composer on a hosting account on our servers:

mkdir -p ~/.php/composer
cd ~/.php/composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar composer
echo 'export PATH=~/.php/composer:$PATH' >> ~/.bash_profile
. ~/.bash_profile

After doing this, you should be able to type composer --help to see it working.