Install Composer on Windows with XAMPP

There are few easy step Install Composer on Window with XAMPP.

Install Xampp

First of all, you need to download and Installed XAMPP, then we need to install Composer.

Composer

Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries according your project requirement and it will manage (install/update) them in your project for you.

Install Composer

Before start installation, Open php.ini file, you can find this file in the C:\xampp\php path.

php ini

Make sure these lines are enable by removing the semicolon (;) from the start.

extension=php_openssl.dll,
extension=php_curl.dll

Restart your xampp, extension should be enabled after that. Now we are ready to install Composer set up.

1) First Download Composer for Windows and after finished downloading click Composer-Setup.exe – it will install the latest composer version whenever it is executed. Click on the next button.

composer-first-step

2) Select php.exe file. Click on the next button.

composer-second-step

3) No need to add proxy URL. Click on the next button.

composer-third-step

4) Ready to install and click on the Install button.

composer-fourth-step

5) Once you successfully installed the Composer

Open Command Prompt from Run, press the “Win + R” key to open RUN dialog box. Type cmd, and click/tap on OK.

open command

then type composer and press enter in the terminal you will get following response like in the below image.

composer-terminal

6 Comments
  1. Rg-050 says

    Who can do a lesson on installing Sitemap via Composer for a site on XAMPP? I can not find anything on the Internet on this topic. I tried to establish this sitemap https://github.com/samdark/sitemap but I could not, I did not have enough knowledge.

  2. Alen says

    COOL! I got my installation working. Thanks!

  3. Pablo says

    Hi, I have installed XAMPP version 7.2.1 and I can find the extension=php_openssl.dll, but I cannot find the extension=php_curl.dll in php.ini. Any ideas? Thanks

    1. Full Stack developer says

      Hello Pablo,

      I think you don’t need you enable curl with XAMPP version 7.2.1 because in xampp/php/php.ini there is already enabled extension=curl, please continue install composer set up and please let me know if you still face any issue.

      Thanks

  4. Alexander says

    This was very helpful. Thanks. However, it did not work when I removed the semicolon from “extension=php_openssl.dll” in the php.ini file. The installation of Composer failed. When I added it again, it worked.

    1. Full Stack developer says

      I’m glad it helped you. Happy coding.

Leave A Reply

Your email address will not be published.