Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Uninstall PHP in Windows 10

Tags:

php

powershell

I have installed php and pulled the package through powershell with this command :

Set-ExecutionPolicy RemoteSigned; Invoke-WebRequest -Uri "https://github.com/cretueusebiu/valet-windows/raw/master/bin/php71.ps1" -OutFile $env:temp\php71.ps1; ."$env:temp\php71.ps1"

And I found out that MYSQL doesn't come with it, now I want to install xampp and just replace it. How am I gonna delete my installed php in the computer ?

like image 703
TheBAST Avatar asked Jan 03 '23 23:01

TheBAST


1 Answers

PHP on windows doesn't exactly "install" like Python or something, it will probably download to wherever you ran the script from. Remove this folder and:

  1. Open Control Panel
  2. Open System
  3. Click Advanced System Settings on the left
  4. Click Environment Variables at the bottom right
  5. Find "PATH" line in the "System Variables" box (bottom half)
  6. Click this line and click Edit
  7. Find the line that ends in "php"
  8. Highlight and Delete this line

The XAMPP installer should then register it's own PHP version, but to verify you could repeat these steps but make sure the line that ends in "php" is referring to the folder in which you installed XAMPP

like image 150
mquinn Avatar answered Jan 05 '23 14:01

mquinn