Monday 16 July 2018

How to Install Two Versions of XAMPP Side-by-Side

How to Install Two Versions of XAMPP Side-by-Side

I’ve used XAMPP for as long as I can remember. I used it originally so I could learn and practice PHP without having to purchase hosting, however I use it now-a-days to develop sites locally before putting them into the public domain.
Each version of XAMPP comes by default with a specific version of PHP and MySQL. As we all know though, for whatever reason, different projects might require different versions of this software so I needed a way to move between them quickly.
If you do have XAMPP installed but, for example, require a different version of PHP then the obvious approach is to simply delete the current version of XAMPP and install the version which comes with the right version of PHP for the project in question.
Although this approach would work, this is not only going to make you lose all of your existing sites, but also make it very time consuming going forward if using different versions of XAMPP becomes common practice.

THE BETTER/EASIER SOLUTION

Fortunately there is a practical way to have two versions of XAMPP installed simultaneously so you can run each specific version depending on the project in hand. The steps below outline how to achieve this:
1. Firstly make sure XAMPP and the related services are not running. Stop all the services such as Apache and MySQL and exit the XAMPP control panel.
2. Navigate to where your current XAMPP installation is located (normally C:\) and rename the existing ‘xampp‘ folder to something else. It doesn’t matter what you call it but I recommend you name it something meaningful. You could for example append it with the version number, such as ‘xampp-1.7.2‘.
3. Download the required version of XAMPP and install it as normal, preferably in the same location as where your existing folder was from step 2. You should now have two versions of XAMPP installed.

SWITCHING BETWEEN INSTALLATIONS

Now that you have two (or more) versions installed it’s easy to switch between them:
1. Make sure that the active XAMPP and any related services are not running. Stop all the services such as Apache and MySQL and exit the XAMPP control panel.
2. Navigate to where you installed XAMPP and swap the folder names around so the one you want to run becomes named ‘xampp‘. You can then launch the control panel and you will be using the other version.

THINGS TO CONSIDER

Although it is possible to have two versions of XAMPP installed, it’s not possible to have them running at the same time. It’s important that you stop one version completely before performing the steps above in the ‘Switching Between Installations’ section.
The other thing to note is that by following the steps above you are running two completely isolated version of XAMPP. This means they won’t share any of the same configuration files, databases etc.

0 comments:

Post a Comment