The 6 step process
- Backup your files
- Export your databases
- Uninstall the old version of XAMPP
- Install the new version of XAMPP
- Adjust PHP settings
- Restore your website files and databases
Step 1 - Backup your files
C:\xampp\htdocsfolder is where all your website files are kept, but I prefer to go with the belt and braces method and I backup my entire XAMPP install folder, in my case
C:\xampp. This way I have everything just in case I forget some config file that I may have also changed in the past, for some good reason that I have now forgotten about.
Step 2 - Export your databases
The temptation when backing up your MySQL databases is to export them all to 1 file because it is quicker. Yes, it is quicker to create, but it is a pain when you run into import issues eg due to the size of the file and timeouts etc. In the long run it is much better to create an export file for each database.
Make sure you save the export somewhere away from your current XAMPP install folder as this will be deleted during the upgrade.
Go to phpMyAdmin eg http://localhost/phpmyadmin/ to export each database click on a database in the list on the left hand side, and then click on the Export tab and at the bottom of the export page click on Go.
Once the database has finished exporting, repeat this for each database. You don’t need to export the following databases as they are system database that are created as part of the XAMPP install
Step 3 - Uninstall the old version of XAMPP
uninstall.exe.You will be asked if you want to delete the
htdocsdirectory. At this point double check your backup is somewhere away from your previous xampp install directory, and once you have confirmed this click “Yes”. Now wait, and wait some more, as this could take a while depending on how many local websites and files you have in your
htdocsfolder. I had a lot.
Step 4 - Install the new version of XAMPP
Step 5 - Adjust PHP settings
Depending on your setup there may be a few things in the php.ini file that you need to tweak to make things work/run better. You can find the php.ini file in
For example you might want to increase the size of :
If you use the default PHP mail() function with your setup you may need to reconfigure the email settings eg:
For a more detailed discussion on how I set up mail to work on localhost have a read of my post “Sending email from localhost when using xampp on windows“.
Don’t forget if you have already started Apache for some reason, you will need to stop and start Apache before these settings will take effect.
Step 6 - Restore your website files and databases
C:\xampp\htdocs. You don’t need to copy the following folders and files as they are part of the xampp install:
At this point, hopefully you will be all good to go. But there are a few more things that you may need to do to make your life easier.
Restore virtual hosts file
httpd-vhosts.conf, if you install xampp to
C:\xamppfor example found in
C:\xampp\apache\conf\extrain which case you will need to find it in your backup and restore the content to the new version of xampp.
Set up SSL to work with localhost
Sometimes it is helpful to have SSL setup to work with localhost. For more information on how to do this, have a read of my post “Setting up a self-signed SSL certificate for localhost when using XAMPP on Windows“.
Run As Administrator
If you try to run the XAMPP control panel after install you are likely to see in the console log a message that:
You are not running with administrator rights! This will work for most application stuff but whenever you do something with services there will be a security dialog or things will break! So think about running this application with administrator rights!
An example of things breaking, is when you try to quite you may get the message every time.
Error: Cannot create file “C:\xampp\xampp-control.ini”.
Access is denied
You can overcome this by going to where XAMPP was install eg
C:\xampp and right click on
xampp-control.exe, choose Properties then go to the Compatibility tab and check the box next to “Run this program as an administrator”
The only problem with this solution, is every time you run the control panel, depending on your Windows settings, you will get a User Account Control warning message, confirming that you want to allow the program to make changes to your computer.
The solution is to install the modules eg Apache and MySQL to run as Services, as currently you would see a big red cross in the Service column of the control panel.
To install Apache and MySQL as a service simply click on the red cross for each and choose “Yes”.
When both are installed as a service you will then see 2 green ticks.
Installing them as a service means you don’t need to run the control panel each time you want to work with your localhost as they will already be running. You can still run the control panel if you need to access things like to stop and start a service etc, but it is no longer necessary to have the control panel running all the time.
- Download XAMPP from Apache Friends
- How to Upgrade XAMPP for WordPress Without Losing Anything
- WordPress.org Installing XAMPP specifically for Windows Users
XAMPP seems more targeted towards Unix users and as such is a little light on detail for Windows users. This hopefully was a useful guide for Windows users on how to upgrade their install of XAMPP.
As I mentioned at the start it is not so much an upgrade process, as it is a step by step process, involving backups, uninstalling the old version and installing the new version.