How to run multiple PHP versions on multiple XAMPP Windows
For this tutorial I will show you how to install 4 different XAMPP's with 4 different PHP versions in your Windows pc. These XAMPP installers are the following:
XAMPP installers
- XAMPP 5.6.40 with PHP version 5.6.40
- XAMPP 7.4.30 with PHP version 7.4.30
- XAMPP 8.0.23 with PHP version 8.0.23
- XAMPP 8.1.10 with PHP version 8.1.10
I tried installing single XAMPP and then tried YouTube tutorials for configuring another version of PHP inside the same XAMPP folder but I can't make it work. After doing so many edits with XAMPP's file, my XAMPP Control Panel will not work anymore.
Then, I decided to install multiple XAMPP's and just edited some of its config files and it worked for me. And without further ado, let's start.
Here are the steps on how to run multiple PHP versions on multiple XAMPP installation using your Windows pc
1. First, download XAMPP 5.6.40 here. When done, start the installation.
2. After installing XAMPP 5.6.40 do not open it yet. Go to your xampp folder at c drive and rename it to xampp56.
3. When done, open your XAMPP Control Panel and edit the following config files for Apache.

These files are the following:
- Apache (httpd.conf)
- Apache (httpd-ssl.conf)
- Apache (httpd-xampp.conf)
- PHP (php.ini)
You need to change all C:/xampp to C:/xampp56 as well as this path \\xampp change it to \\xampp56 and this path C:\xampp to C:\xampp56.
4. Do not forget to save every config files that you edit.
5. Now, you need to edit the my.ini which located in the MySQL Config (see image below).

Just change all the C:/xampp path to C:/xampp56 also. Then save your config file.
6. When done, Quit (not Exit) your XAMPP and open it again. Now, try running your Apache and MySQL. If both run and no error occurred, then, your first XAMPP is good to go. You need to QUIT your XAMPP now and proceed to the next tutorial below.
Installing the second XAMPP, which is version 7.4.30
1. Download XAMPP 7.4.30 here first.
2. After downloading, install it.
3. Doing the same steps as above, go to C drive and rename your xampp folder again. This time name it as xampp74.
4. And do the same steps as given above for editing the config files of Apache and MySQL.
5. When done, run your second XAMPP installation. If everything is good then continue doing the same steps for the remaining two versions of XAMPP.
Download the two versions below:
Just repeat the given steps above with these two versions of XAMPP.
When done, you will have a total of 4 different installed XAMPP versions on your Windows pc C drive.

Important Notes:
Make sure you make shortcuts for all your 4 different XAMPP Control Panels like I did (see image below)

Making shortcuts will make it easier for you to open the right version of XAMPP and PHP that you needed for your project. You can make a shortcut by going to C drive and then open the xampp folder version that you want to make shortcut. Then find and right-click "xampp-control.exe" and then click Send to Desktop create shortcut. Just rename it so that you will easily recognize the version.
And lastly, when switching XAMPP versions, do not forget to QUIT the current XAMPP you are using first.
If you have question, leave a comment below. Cheers!
No comments:
123how.xyz only wants on-topic comment. Do not include any link, else your comment won't be published. Thanks!