Composer is one of the best and most powerful package manager for PHP. With the help of composer user can easily manage their libraries or packages in a per-project basis. But by default composer will never install anything globally.
Before doing anything else you need to download and install XAMPP. If you don’t know how to install XAMPP on windows machine you can check my previous posts.
Before we start installation, we need to open php.ini file which is located in xampp/php/php.ini. Then find following lines one by one and remove semicolon (;) from the start.
After above changes we are ready for Composer Installation.
Install Composer on Windows Machine with XAMPP
First of all you need to download Composer-Setup.exe file from getcomposer.org/download page. Once file downloaded click on it. After click on file, some permission window will open; feel free to click YES on that pop up. After that, Composer setup starts. Click on the next button as given below in the image.
After click on next. Settings Check window will appear here you add your php.exe path which is located in your XAMPP directory in PHP folder (xampp/php.exe).
After selecting php.exe click on next. It will then go to Proxy Settings. Here you can add proxy URL. Just click on next button because right now you don’t need to use proxy.
Next is ready to install window. Just click on Install button and installation will start.
After installation, Information window will open in which you need to close and open command line and file explorer but my recommendation is restart your Computer. Done
6 Replies to “How to install Composer on Windows with XAMPP”
I ma getting the following error, while reaching to last step:
The “https://getcomposer.org/versions” file could not be downloaded: php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
I am getting following error..
The “https://getcomposer.org/versions” file could not be downloaded: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
In which step you are receiving this issue?
it worked here.
the only thing the line extension=php_openssl.dll needed the semicolon (;) in my setup
Hi, i can’t seem to install composer, it always pop up a message that “php4ts.dll is missing”