How do I uninstall a Web Platform Installer (WPI) installation of PHP?

This link has instructions on how to manually remove a version of PHP from IIS on Windows 7. I would think the instructions for Windows Server 2008 would be similar. It seems to be instructing you to edit the applicationHost.config file and delete the folder.

http://forums.iis.net/t/1178803.aspx

From the link:

Open %userprofile%\documents\iisexpress\config\applicationhost.config file and:

  1. Find following entry (or similar entry) in applicationhost.config file and comment it or delete it.

    <application fullPath="C:\Program Files\iis express\PHP\v5.2\php-cgi.exe" monitorChangesTo="php.ini" activityTimeout="600" requestTimeout="600" instanceMaxRequests="10000">
        <environmentVariables>
            <environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="10000" />
            <environmentVariable name="PHPRC" value="C:\Program Files\iis express\PHP\v5.2" />
        </environmentVariables>
    </application>
    
  2. Find following entry in hanlders section and comment this as well or delete.

    <add name="PHP52_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\iis express\PHP\v5.2\php-cgi.exe" resourceType="Either" />
    
  3. By default Web Platform Installer installs PHP to %programfiles%\iis express\php. so open %programfiles%\iis express\php\ folder and delete the php version folder that you no longer need (don't forget to remove relavant entries from applicationhost.config as mentioned in step 1 and 2 above)


1) In IIS Manager, click your machine in left pane. Then click "Handler Mappings" in right pane. Find the "PHP5?_via_FastCGI" for the PHP version you want to remove, right click then "Remove".

2) In IIS Manager, click your machine in left pane. Then click "FastCGI Settings" in right pane. Find the "C:\Program Files (x86)\PHP\v5.?\php.ini" for the PHP version you want to remove, right click then "Remove".

3) Go to Control Panel, "Uninstall a Program". Uninstall those extensions for PHP 5.? (WinCache etc)

4) Run Windows Explorer, remove folder "C:\Program Files (x86)\PHP\v5.?".