Installing Composer on OS X

Composer is a cross-platform dependency manager for PHP libraries. Let’s install it on OS X and add an alias/shortcut/command so you can use it from anywhere.

Downloading Composer will create a Phar (PHP Archive) file called “composer.phar”

From your terminal, run the following command:

curl -sS https://getcomposer.org/installer | php // S option to show any errors if occurred while downloading
mv composer.phar /usr/local/bin/composer

Now, try composer command in terminal.

Leave a Reply

Your email address will not be published. Required fields are marked *