Can I use 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, we do have Composer installed on our servers, and you can use it from a shell connection by typing commands like:

$ composer --help
$ composer require monolog/monolog

What if I need a different version of Composer?

The global version composer that we have installed systemwide should work for most cases. Experts can install different versions locally for your account if they need to. For example, these six lines should successfully install a current version of 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.