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

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

  5. Edwin Adeola Oluwasina says

    This post is so straightforward and useful. Thanks to those that compiled this post.

  6. Awii says

    I followed all the steps you have mentioned, But still I am getting ‘composer is not recognised as an internal or external command’ ,I restarted my computer , checked environment variable PATH its showing correct, but still not working, can you please let me know if I am missing something and how to resolve this problem.

    1. Full Stack developer says

      Hello Awii ,

      I am sorry you are facing problem, i searched about your problem and found some useful articles related to same problem , please check below –

      https://stackoverflow.com/questions/27732413/composer-is-not-recognized-as-an-internal-or-external-command
      https://stackoverflow.com/questions/39724594/composer-is-not-recognized-as-an-internal-or-external-command-in-windows-serve

      Please message me if above articles don’t solve your issue or email me contactus@thecodedeveloper.com

      Thanks
      Vikas

  7. Adoga Sunday says

    you are a good teacher it is perfect. thanks so much.

    1. Vikas Kumar says

      @Adoga Sunday
      I am so glad! Thank you so much for your kind words and your support.

Leave A Reply

Your email address will not be published.