Composer Installation – Windows

Using the Installer#

This is the easiest way to get Composer set up on your machine.

Download and run Composer-Setup.exe. It will install the latest Composer version and set up your PATH so that you can call composer from any directory in your command line.

Note: Close your current terminal. Test usage with a new terminal: This is important since the PATH only gets loaded when the terminal starts.

Manual Installation#

Change to a directory on your PATH and run the installer following the Download page instructions to download composer.phar.

Create a new composer.bat file alongside composer.phar:

Using cmd.exe:

C:\bin> echo @php "%~dp0composer.phar" %*>composer.bat

Using PowerShell:

PS C:\bin> Set-Content composer.bat '@php "%~dp0composer.phar" %*'

Add the directory to your PATH environment variable if it isn’t already. For information on changing your PATH variable, please see this article and/or use your search engine of choice.

Close your current terminal. Test usage with a new terminal:

C:\Users\username>composer -V
Composer version 1.0.0 2016-01-10 20:34:53