Installation fails with permission errors when trying to install a new PHP version.
Installing PHP versions requires write access to the XAMPP directory (C:\xampp), which typically requires administrator privileges.
Run PowerShell as Administrator before installing PHP versions.
Method 1: Start Menu
- Press the
Windowskey - Type "PowerShell"
- Right-click on "Windows PowerShell"
- Select "Run as Administrator"
Method 2: Win + X Menu
- Press
Win + X - Select "Windows PowerShell (Admin)" or "Terminal (Admin)"
Method 3: From File Explorer
- Open File Explorer
- Navigate to any folder
- Click "File" → "Open Windows PowerShell" → "Open Windows PowerShell as administrator"
Once you have an administrator PowerShell window, run your install command:
pxp install 8.2.27To check if you're running as administrator, look for "Administrator" in the PowerShell window title:
Administrator: Windows PowerShell
Or run this command:
([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)This should return True if you have administrator privileges.
If you don't want to open a new admin window, you can run a specific command with admin rights:
- Right-click on PowerShell/Terminal icon
- Select "Run as Administrator"
- In the admin prompt, run:
pxp install [version]
You might see errors like:
- "Access to the path is denied"
- "UnauthorizedAccessException"
- "Administrator rights required"
All of these indicate you need to run PowerShell as Administrator.