Install and Configure PHP on Windows

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

  1. Download the current Windows build from the official PHP site.
  2. Install the matching Microsoft Visual C++ runtime.
  3. Extract PHP to a stable path such as C:\PHP.
  4. Copy php.ini-production to php.ini and enable only required extensions.
C:PHPphp.exe -v
C:PHPphp.exe --ini
C:PHPphp.exe -m

Configure 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.

admin

admin

Leave a Reply

Your email address will not be published.