navigation bar



Composer Installation On Windows

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 just 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 install snippet to download composer.phar:

C:\Users\username>cd C:\bin
C:\bin>php -r "readfile('https://getcomposer.org/installer');" | php

Note: If the above fails due to readfile, use the http url or enable php_openssl.dll in php.ini
Create a new composer.bat file alongside composer.phar:

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

Add the directory to your PATH environment variable if it isn't already.
Close your current terminal. Test usage with a new terminal:

C:\Users\username>composer -V Composer version 27d8904

Now that you've installed Composer, you are ready to use it! 

No comments:

Post a Comment