Introduction
Want to install Composer on your Windows computer the easy way?
You’re in the right place!
In this step-by-step guide, I’ll show you how to install Composer on Windows, set it up properly, and verify everything works — even if you are a complete beginner. 🚀
Let’s get started!
What is Composer?
Composer is a dependency manager for PHP.
It helps you easily manage libraries, packages, and tools that your PHP project needs.
For example:
Installing PHP packages automatically
Managing project versions
Keeping your project organized
Think of it like npm for Node.js or pip for Python — but for PHP!
Step-by-Step Guide to Install Composer on Windows
Step 1: Check if Composer is Already Installed
First, let’s see if Composer is already installed on your PC.
Press
windows + R
, typecmd
, and hit Enter to open Command Prompt.Type the following command:
If Composer is installed, you will see:bashcomposer -V
Or if you see an error like:cmdComposer version 2.7.2 2024-04-11 13:45:20
It means Composer is not installed yet — so let’s install it!cmd'composer' is not recognized as an internal or external command, operable program or batch file.
Step 2: Install PHP (Required)
⚡ ” Composer needs PHP installed first!”
If you haven’t installed PHP yet, follow this beginner PHP installation guide (or refer to our earlier article).
php -V
You get a valid PHP version.
Otherwise, Composer won’t work!
Step 3: Download Composer for Windows
Visit the official Composer website: 👉 https://getcomposer.org/
Click on Download from the top menu.
Under Windows Installer, click Composer-Setup.exe to download the installer.
Step 4: Install Composer using Composer-Setup.exe
After downloading:
Double-click the downloaded
Composer-Setup.exe
file.The Composer Setup Wizard will open:
Click Next (Don’t check develper mode).
The installer will try to find PHP.exe automatically:
If you installed PHP earlier, it will detect it.
Otherwise, you may need to browse manually to where
php.exe
is (likeC:\php\php.exe
).
4. Keep default settings unless you have a specific need.
5. Click Install.
- 6. After installation is complete, click Finish.
✅ Composer will automatically add itself to the Windows environment PATH, so you can run it from any folder.
Step 5: Verify Composer Installation
Let’s double-check that Composer is now installed properly.
Open Command Prompt again.
Type:
bashcomposer -v
If everything was done correctly, you will see Composer’s version information like:
cmdComposer version 2.8.8 2025-04-04 16:56:46
Congratulations! 🎉 You have successfully installed Composer on your Windows PC.
Frequently Asked Questions (FAQs)
1. Do I need an internet connection to install Composer?
Yes, you need an active internet connection to download the Composer installer and install any PHP packages later.
2. Composer is asking for PHP path. What should I do?
php.exe
automatically, browse manually to where PHP is installed (example: C:\php\php.exe
).3. Is Composer free to use?
Absolutely!
Composer is free and open-source for everyone to use.
4. Can I use Composer without installing it globally?
Yes, but installing Composer globally makes it easier to use from any folder without needing to copy files manually.
Final Words
Installing Composer on Windows is very simple when you follow the right steps:
✅ Install PHP → ✅ Download Composer-Setup.exe → ✅ Run and Finish Setup → ✅ Verify Installation
Now you’re ready to manage PHP projects efficiently like a pro! 🚀
🎯 Pro Tip:
After installing Composer, you can easily create PHP projects, install libraries like Laravel, Symfony, or any PHP package with just a single command.
Example:
composer create-project laravel/laravel my-app
It’s super powerful!