Uninstall PHP

The answer to this may be obvious to you experienced people, but it isn’t obvious to me. How do I uninstall PHP, it doesn’t show up in the Programs Control panel list?

The answer depends on how you “installed” PHP in the first place!

It was installed as an individual package, NOT WAMP.

You just delete it, there is no “uninstall”

True, but you may need to remove any associations with IIS or Apache so when you reboot either server you don’t get an error due to a missing DLL reference.

Few possibilities:

  • If you used a MSI installer, run it again. I will probably ask you to “repair” or “uninstall” the product. Choose “uninstall”.
  • Look in the “add/remove programs” section.

If you absolutely have to uninstall it the hard way:

  • Remove PHP script maps for each website from IIS (the process varies depending on IIS version)
  • Restart IIS
  • Delete the PHP directory

Thanks everyone.

Also check and see if you still have a php.ini file lying around – remove it in case you do another install in the future.

From memory you may also need to remove references to PHP in your $PATH directive … sorry, I cannot remember the exact way to do that on win/IIS, but I can remember having to set it more than a few times. (My Computer / System Properties / Environment Variables maybe?)

In order to get mysql_* functions working you possibly have moved mysql.dll (or some similar named dll) into /Windows/system32 folders or similar, depending on your win version.