How to Install Composer on Windows

Composer is a program that functions to link projects with libraries from Packagist. Allows you to install or manage all the modules needed in website project development.

There are several benefits of using this Composer, such as making PHP code more structured and not having to include all the required PHP classes because it is helped by features autoload.

Before starting to install Composer, make sure that on the Windows computer you are using XAMPP installed. Because later it is needed during the installation process takes place.

Download Composer

First of all, please download the Composer program on the Getcomposer website. After that please click the button Download available there. And then click on options Composer-Setup.exe.

Composer program file size is very small, not up to 2 MB. And if it has been downloaded, please continue to see and follow the installation steps below.

Tutorial Install Composer on Windows

  1. Please double-click the Composer file that was downloaded earlier.

  2. Then in the dialog that appears, click the button Next.

  3. After that Composer will ask for the php.exe file directory on the computer. Please search the XAMPP directory. For example C:\XAMPP\php\php.exe.

    Find PHP Directory in XAMPP

  4. Then click the button Next.

  5. On dialogue proxy settingsleave the default, and continue to click the button Next again.

    Click the Next Button Again

  6. Now a review dialog appears for the PHP version that is being used. If you feel it is correct, please click the button Install.

    Review Changes and Click the Install Button

  7. Almost done, and now a review will appear again that displays information that there are changes to the Windows Environment. This is so that Composer can be run directly through the Command Prompt. And just click the button Next.

    How to Install Composer on Windows

  8. Finally the installation process is complete. Now you can click the button Finish to finish it.

    Composer Installed Successfully

Altogether there are eight steps you can follow to install Composer on Windows. And please set the PHP directory location correctly so that the installation process runs smoothly.

Also read: How to Display Encrypted Javascript Original Code

Check Composer in Command Prompt

In step-7 above, the Command program will automatically make changes to the Windows Environment. Which it means to add PATH only, so that Composer can be run directly from the Command Prompt.

So now you can directly test or check whether Composer is running smoothly. The method is very easy, please open the Command Prompt, and then run the command below:

composer

Check Installation Command on Windows

If it looks like the picture above, that’s a sign that from now on Composer can be used.

If you have any questions about installing Composer on Windows, feel free to comment below for help.

Hopefully useful and good luck