---
title: "Using Composer"
date: "2016-01-07"
category: "php"
slug: "using-composer"
---

[Composer](https://getcomposer.org/) is a dependency manager for PHP, similar to npm for Node.js and Bundler for Ruby.

Composer is provided on all [[determining-platform-version]]. On an older platform, request a platform migration.

## Installing Composer

Login to the [[accessing-terminal]] and run:

```bash
curl -sS https://getcomposer.org/installer | php

```

This downloads Composer as a [PHP archive](http://php.net/manual/en/book.phar.php) to your current directory. You can run it with:

php composer.phar

## Creating a Global "composer" Command

To make Composer available system-wide, move the archive and create a shell alias:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin
echo 'alias composer="php /usr/local/bin/composer.phar"' >> ~/.bash\_profile

Log out and log back in, then type `composer` to verify. To upgrade Composer in the future, re-run the first two lines only.

## See Also

- [Composer documentation](https://getcomposer.org/doc/)
