Download Composer

Run this in your terminal to get the latest Composer version:

php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '781c98992e23d4a5ce559daf0170f8a9b3b91331ddc4a3fa9f7d42b6d981513cdc1411730112495fbf9d59cffbf20fb2') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); }"
php composer-setup.php
php -r "unlink('composer-setup.php');"

This installer script will simply check some php.ini settings, warn you if they are set incorrectly, and then download the latest composer.phar in the current directory. The 4 lines above will, in order:

WARNING: Please do not redistribute the install code. It will change with every version of the installer. Instead, please link to this page.

Installer Options

--install-dir

You can install composer to a specific directory by using the --install-dir option and providing a target directory. Options must be appended to -- so that PHP ignores them, like -- --install-dir=bin, example:

php composer-setup.php --install-dir=bin

--filename

You can specify the filename (default: composer.phar) using the --filename option. example:

php composer-setup.php --filename=composer

--version

You can install composer to a specific release by using the --version option and providing a target release. example:

php composer-setup.php --version=1.0.0-alpha8

Manual Download

If you prefer to download the phar manually, here are the available versions:

Latest Snapshot
1.0.0-alpha11 (2015-11-14)
1.0.0-alpha10 (2015-04-14)
1.0.0-alpha9 (2014-12-07)
1.0.0-alpha8 (2014-01-06)
1.0.0-alpha7 (2013-05-04)
1.0.0-alpha6 (2012-10-23)
1.0.0-alpha5 (2012-08-18)
1.0.0-alpha4 (2012-07-04)
1.0.0-alpha3 (2012-05-13)
1.0.0-alpha2 (2012-04-03)
1.0.0-alpha1 (2012-03-01)