How to Install Composer on Windows with XAMPP

In this tutorial, we are going to install Composer on Windows 7 computer with Xampp.

Composer is a dependency Management software built specially for PHP. It allows you to install PHP libraries from Packagist, which is its main package repository containing all the available packages.

Useful Read: How to remove last comma from string using php?

To install Composer on your Windows computer follow the steps given below;

1. Download the Composer

Visit the official Composer website and click on the download link.

Installing Composer on Windows Step 01

Installing Composer on Windows Step 01

This will take you to the composer download page. On this page look for Windows Installer section. Here you will see a link to download Composer-Setup.exe file. Click on that link to download the process.

Download Composer For Windows

Download Composer For Windows

2. Start the Installation Process

After successfully completion of the download process, double click the downloaded file to start the installation process. You will see a window similar to one shown in the following image.

 

Installing Composer on Windows Step 02

Installing Composer on Windows Step 02

Click on the next button to proceed the installation process. In the next step, it will ask for your permission to install the shell menus. Select the Do not install Shell Menus and hit the next button.

Installing Composer on Windows Step 03

Installing Composer on Windows Step 03

In the next step, you need to specify the path to your php.exe file located inside xamp directory. Usually, path to php.exe is C:\xampp\php\php.exe. But, it may vary depending on in which drive your XAMPP installation is located e.g. in my case it is D:\xampp\php\php.exe. In most of the situations it will detect the path to php.exe file but if it doesn’t you have to manually locate the file using browse option. After, specify the path click the next button.

Installing Composer on Windows Step 04

Installing Composer on Windows Step 04

This will take you to the pre-installation(Ready to install) window. Hit the install button to start the actual installation.

Installing Composer on Windows Step 05

Installing Composer on Windows Step 05

After successful installation you will see a screen similar to one below. Click finish to complete the installation process.

Installing Composer on Windows Step 06

Installing Composer on Windows Step 06

To test if the composer is working properly, press Windows + R to start the run program and inside that program type cmd and click ok to start the command prompt.

Start Composer 01

Start Composer 01

This will open the command prompt window,

Start Composer 02

Start Composer 02

In the command prompt, type composer and hit enter. This will display your composer’s version number and various options(command) available with composer. If you are able to see these options then you have installed composer successfully.

Start Composer 03

Start Composer 03

In case, you have any comments or queries feel free to comment.

0 Comments

Leave a Comment.