Last updated: August 26, 2026.
For IIS, use a current x64 Non-Thread-Safe PHP build with FastCGI. For command-line work only, extract PHP and add its directory to the user or system PATH.
Install PHP
- Download the current Windows build from the official PHP site.
- Install the matching Microsoft Visual C++ runtime.
- Extract PHP to a stable path such as
C:\PHP. - Copy
php.ini-productiontophp.iniand enable only required extensions.
C:PHPphp.exe -v
C:PHPphp.exe --ini
C:PHPphp.exe -mConfigure IIS FastCGI
Enable IIS CGI/FastCGI, add a FastCGI application for php-cgi.exe, and map *.php requests to it. Keep display_errors=Off in production and log errors to a protected location.
date.timezone = America/New_York
display_errors = Off
log_errors = On
extension_dir = "ext"Follow the official PHP Windows installation guide for build selection and runtime requirements.