To install PHP on Windows, you have several options, with Winget being the most modern and straightforward method:
Using Winget (Recommended for Windows 10/11)
Open Command Prompt or PowerShell as Administrator.
Run the following command to install PHP (e.g., PHP 8.4):
winget install PHP.PHP.8.4This downloads, extracts, and adds PHP to your system
PATH, allowing you to runphp -vin any terminal.
Using Pre-Packaged Bundles (Easiest for Beginners)
XAMPP or WAMP: These bundles include PHP, Apache, and MySQL. Download from:
https://www.apachefriends.org (XAMPP)
https://www.wampserver.com (WAMP)
Install, start the services, and test with a
phpinfo()file.
Manual Installation (For Advanced Users)
Go to https://windows.php.net/download/ and download the non-thread-safe ZIP version for your system (x64 or x86).
Extract the files to a folder (e.g.,
C:\php).Add
C:\phpto your System Environment Variables > Path.Open a new Command Prompt and run:
php -vto verify installation.
✅ Tip: Use Winget for automatic updates and clean management. Use XAMPP/WAMP if you want a full local web server stack.
Did you get your version of PHP from? http://windows.php.net/download/ I've just downloaded the ZIP from there and it contained php-win.exe
Check you've not accidentally downloaded the php source
Answer from Jez Emery on Stack OverflowHow can I install php on Windows - Stack Overflow
PHP installation on windows - Stack Overflow
how to install php in windows 11
how to install ExifTool for php on windows 10?
Videos
Did you get your version of PHP from? http://windows.php.net/download/ I've just downloaded the ZIP from there and it contained php-win.exe
Check you've not accidentally downloaded the php source
Tutorial
recommendation: install powershell latest version
Install scoop - https://scoop.sh/
1- on powershell: iwr -useb get.scoop.sh | iex
Install php (latest version)
- scoop install php
Install php (specific version)
- scoop bucket add php
- scoop search php
- scoop install php/php7.4.26
Install composer
- scoop install composer
Composer/php folder:
- C:\Users\username\scoop\apps\php7.4
- C:\Users\username\scoop\apps\composer
where to config composer/php manually
- C:\Users\username\scoop\persist
enable php extensions
- on terminal
cd C:\Users\username\scoop\persist - on terminal(will open vscode)
code . - edit C:\Users\username\scoop\persist\php7.4\conf.d\extensions.ini
extensions.ini - example
extension=php_openssl.dll
extension=fileinfo
extension=curl
extension=pdo_sqlite
extension=pdo_mysql
extension_dir=C:\Users\username\scoop\apps\php7.4\7.4.26\ext
First: go to www.php.net and click on downloads, or go directly to http://www.php.net/downloads.php
http://windows.php.net/download
Choose the latest PHP x.y.z (Current stable)
For IIS, download the non-threadsafe zip file
Extract the downloaded zip file to c:\PHP
Download PHP-Manager for IIS 7 (that's an IIS-controlpanel-extension, also works for IIS 8) from https://github.com/phpmanager/phpmanager/releases (make sure you choose the right bitness (32 vs. 64)
Open the IIS management console (inetmgr.exe)
Double-click PHP-Manager and click on "register new PHP installation"
(note to self: never remove the PHP directory, otherwise "rien ne va plus")
- Choose php-cgi.exe and click ok

- Click on "Configure error reporting". Check "Development machine" and click apply, then click "back to main page"

- Go to C:\inetpub\wwwroot and create a new textfile called "phpinfo" and put this content into it :
<?php
phpinfo(); // Show all information, defaults to INFO_ALL
?>
Create a new file called hello.php in c:\inetpub\wwroot with this content
<?php echo "Hello World !" ; ?>
10. open cmd.exe and execute "iisreset"
- Use your browser of choice, and navigate to those pages:
http://localhost/phpinfo.php
http://localhost/helloworld.php
Now IIS is (should be) serving PHP.
As far as I can see there are no MSI installers for PHP 5.4.x available from http://windows.php.net/
Additionally, since PHP 5.3 there are no MSI installers available that work together with the binaries from apache.org and you have to use the binaries from http://www.apachelounge.com/