Fam Wencong, Kenneth

My Diary

Enabling PHP on IIS Express

Published: Saturday, January 25, 2020

You might be thinking of developing a web application using PHP and IIS Express such as a WordPress site. IIS Express supports PHP. To install PHP on IIS Express run the following commands from the command prompt as Administrator.

"C:\Program Files (x86)\IIS Express\appcmd.exe" set config /section:system.webServer/fastCGI /+[fullPath='"C:\Program Files (x86)\PHP\php-cgi.exe"']
"C:\Program Files (x86)\IIS Express\appcmd.exe" set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='"C:\Program Files (x86)\PHP\php-cgi.exe"',resourceType='Unspecified']

Change the fullPath and scriptProcessor to your own local variables.

You can also use Microsoft’s Web Platform Installer if you rather not install the components separately.