XAMPP PHP Change

Straightforward way to change PHP versions for XAMPP on Windows 10.

Featured image for XAMPP PHP Change
  1. We will be assuming you have already one version of XAMPP installed.
  2. Download and Install your PHP version via XAMPP.
    1. This is needed as XAMPP provides the correct DLL files needed for the change
  3. Make a new php folder in your target XAMPP that you are changing. (Suggestion: Name it the version it is. EG: PHP724/)
  4. Enter your new XAMPP folder and proceed into the new PHP version you wish to use.
  5. Copy all of the contents (CTRL+A, then CTRL+C).
  6. Enter into your original XAMPP folder and proceed into your new PHP folder.
  7. Paste all of the copied contents (CTRL+V)
  8. Open the file in your target XAMPP /apache/conf/extra/httpd-xampp.conf
  9. Copy the following into a new line, comment it out, and change the PHP folder to the new PHP folder. Then you're good to go!

LoadFile "C:/xampp724/php/php7ts.dll"
LoadFile "C:/xampp724/php/libpq.dll"
LoadModule php7_module "C:/xampp724/php/php7apache2_4.dll"

#LoadFile "C:/xampp724/php/php7ts.dll"
#LoadFile "C:/xampp724/php/libpq.dll"
#LoadModule php7_module "C:/xampp724/php/php7apache2_4.dll"

LoadFile "C:/xampp724/php71/php7ts.dll"
LoadFile "C:/xampp724/php71/libpq.dll"
LoadModule php7_module "C:/xampp724/php71/php7apache2_4.dll"