XAMPP change PHP version

I did following steps on Windows:

  1. Download your XAMPP with your desired PHP version (the VC-11.zip version)

  2. Unzip on C:/xamppXXXX/ (XXXX -> Your PHP version, for example), so you'll have both C:/xampp/ (your first installed version) and the new.

3a. Find in all .conf, .ini, .bat files from the xamppXXXX folder /xampp/ and replace for C:/xamppXXXX/. You can use any IDE like SublimeText to find the string.

3b. Find in all .conf files from the xamppXXXX folder \xampp\ and replace for \xamppXXXX\

  1. You can start MySQL from your installed version control panel and open the C:/xamppXXXX/xampp-control.exe and launch Apache from this one.

I did this with php7 installed and php5 from zip and working fine. Opening different instances of XAMPP Control Panel is the best way to have all databases together and not losing them between versions.

Tags:

Php

Xampp