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.
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.
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.
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.
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.
This will take you to the pre-installation(Ready to install) window. Hit the install button to start the actual installation.
After successful installation you will see a screen similar to one below. Click finish to complete the installation process.
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.
This will open the command prompt window,
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.
In case, you have any comments or queries feel free to comment.