How to install Composer on Windows with XAMPP

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.

Also read:

 

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.

extension=php_openssl.dll,
extension=php_curl.dll,
extension=php_sockets.dll

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.

Composer Setup Start on Windows

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).

wdb24_composer_setup

wdb24_php_exe

 

wdb24_php_exe_path

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.

Composer Installation Proxy Setting in Windows

Next is ready to install window. Just click on Install button and installation will start.

composer ready to install on windows

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

 

Posted in PHP

Author: Ahsan Zameer

I am a web developer and love to search new stuff on web. Trying different approaches and ideas to make web developing more interesting and enjoyable.