There are a lot of things I like about XAMPP (and that many moreover like), however the update process for this software needs to be reviewed. There is nothing automatic, and if you do it without being warned, you will likely run into big trouble along the way.

In this tutorial, I will walk you through this process of updates, so that it is done without too many problems.

But first, if you have never used XAMPP, we invite you to discover in this tutorial How to install WordPress locally on a PC / Windows with XAMPP

You might ask yourself, "Why not just follow the official documentation"? And that's a very reasonable question. XAMPP is a community project. As such, it lacks corporate backing and a lot of funding.

One of the consequences is that the detailed documentation expected is not available on XAMPP. The point is, if you search for such an update you won't find anything concrete.

XAMPP assistance is limited to Community forums Et al a brief FAQ on the Website Apache Friends. 

If you search for set to day of XAMPP"What you will find is a handful of threads on the XAMPP and StackOverflow forums that offer suggestions such as" only install the new version above the old one "(please don't do that !) but also " you can not put in Day without losing everything"

Why Update XAMPP?

Some might wonder if they really need to update their XAMPP which is working so well?

The main reason to update XAMPP is to have access to a newer version of PHP. Since XAMPP does not update them automatically, if you have been using your version of XAMPP for a while, then it is very likely that you are using an old version of PHP, but especially that you do not have access to the latest version of PHP.

Go further by discovering How to modify or update the PHP version of WordPress

Presentation of the update process

The update of XAMPP is a six-step process:

  1. Back up your files.
  2. Export your databases.
  3. Uninstall the old version of XAMPP.
  4. Install the new version of XAMPP.
  5. Set the PHP parameters.
  6. Restore your files and databases.

This process should work like a charm to move WordPress websites, static websites built with HTML, CSS, and JavaScript, as well as any other websites that use PHP and MySQL. So if you are using XAMPP for WordPress or for PHP in general, you have come to the right place.

Step 1: Back up your files

All your files are not in the folder xamphtdocs. If you have more than one installation of WordPress or website set up in this folder, you will have a subdirectory for each installation or website. Take a look at the directory and determine which websites or files you want to keep.

To back up the files you want to keep, create a new folder and copy the files you want to keep to the new folder.

In my case, I wanted to keep all my files except for the ones that were part of the XAMPP installation: dashboards, img , webalizer, xampp, And so on. I created a backup folder called XAMPP backup on my desktop and copied all the files I wanted to keep directly in this folder.

See also our list of 8 WordPress plugins to backup and restore your website

Xampp-file-copy

Step 2: Export Databases

There are several ways to run phpMyAdmin: using the link in the XAMPP dashboard that appears on the page http://localhost, clicking on admin of the line MySQL the XAMPP control panel, or by simply typing Http: // localhost / phpmyadmin in the address bar your browser.

Admin xampp phpmyadmin

You have two different options when it comes to exporting your databases. The first option is to export all of your databases to an SQL file. The second option is to export each database individually.

We also invite you to discover these 10 WordPress plugins to import or export data

While the first option might seem easier, the downside is that since you will be working with a larger file, you are more likely to have issues importing your databases into your new XAMPP installation.

I have used both methods, and I usually recommend backing up each database individually. It's a little more work, but you'll be less likely to run into errors.

Here are the steps to download all the databases at once:

  • On the phpMyAdmin page, select Export .
  • Select the QUOTE the export method.
  • In the section Data base, hold down the Ctrl key and select all the databases you want to export, being careful not to select the database named phpmyadmin.
  • Scroll to the bottom of the page and click Go .
  • Wait for the SQL file to download to your computer.

Discover also our MailChimp tutorial in English: the complete guide to creating a newsletter

export database PhpmyAdmin

To download each database individually the process is a bit different.

  • On the phpMyAdmin page, select the first database that you want to export by clicking the name of the database where it appears in the list of databases on the left side of phpMyAdmin.
  • Then select Export in the top menu, and at the bottom of the export page, click Go.

Learn as well by reading this article How to edit SALT keys on WordPress

Export a WordPress table

Wait for the download to complete, then do the same process for each database you want to export.

If you are not sure which database you are using with WordPress, you can check by going to the files in your WordPress directory and open the file wp-config.php of each website, and look for the line that looks like this:

identity WordPress database xampp

In the case above, the database associated with this WordPress installation is called standardwp .

Export every database you want to keep and keep it somewhere you can easily find it. Make sure to save it outside of the " xampp"

I kept everything in one folder on the desk.

Step 3: Uninstall the old version of XAMPP

First of all, before trying to uninstall XAMPP make sure that you have copied all of your website and database files. Once you uninstall XAMPP anything that you haven't backed up will be lost. So take a second, and look at your files and make sure you have copied all the files that you want to keep.

In addition, make sure that you have all the databases that you want to save. Once you are sure you have saved a copy of everything you want to record, stop Apache and MySQL and exit the XAMPP control panel.

How to manually update your WordPress plugins ? Find out by consulting this article.

Now you are ready to uninstall XAMPP.

If you have the installer version, you need to use the uninstall script to remove XAMPP. You will find the uninstaller in the directory xamppuninstall.exe . If you are using either the 7zip version Zip, you can safely delete the entire directory xampp without running an uninstall script.

If in doubt as to whether you have the installer or the archives, just make sure you have the uninstaller. If you find it, run it.

Xampp uninstall

During the uninstallation, it may possibly be possible to save the contents of the XAMPP folder. However, you should know that XAMPP only installs in an empty folder anyway. So this option is not really practical.

Step 4: Installing the new version of XAMPP

All you have to do is follow our tutorial on installing XAMPP locally . Make sure you download the latest version of XAMPP from the website Apache Friends.

I prefer the installer version you get when you download XAMPP directly from Apache Friends, but if you prefer the Zip or 7zip versions you are free to access More downloads and select the version you prefer.

Discover also our 9 WordPress plugins to create an affiliate program

Step 5: Setting PHP Settings

PHP settings provides defaults with a fresh XAMPP installation are quite restrictive, even more restrictive than an average shared server is. Before going any further, I recommend making the following changes in the PHP settings:

  • Increase max_execution_time at 120 seconds;
  • Increase upload_max_filesize et post_max_size at 128M.

These parameters can be adjusted by going to the directory xamppphpphp.ini.

Step 6: Restore your websites and databases

Restoring your files is easy. Just copy the files and folders you previously backed up and paste them into the new folder xamphtdocs. Once the copy is finished, they will not be ready for use, since the database is missing.

Also go further by discovering How to manage and restore a version of WordPress with VersionPress

To restore your website databases, you will need to import the SQL file or the files you exported from the original XAMPP installation.

Import multiple databases simultaneously

Downloading your databases simultaneously is fairly straightforward. Start phpMyAdmin, select Import, choose the SQL file that you exported previously from your last XAMPP installation, and once you have selected, click Go .

If the file is large, it may take a while to download. Be patient.

Importing individual databases

You are less likely to run into issues with this solution, which is exactly why I encouraged you to go this route earlier. However, the trick to making this process easy is to name the new databases exactly like those of the previous installation. If you do not do this, you will have to update the file wp-config.php of each website where the name of the database has changed.

The process of downloading your databases is therefore:

  1. Go to phpMyAdmin and click on New in the list on the left side of the app.
  2. Create a new database taking care ofuse exactly the same name as the one used for the original database .
  3. Select the database you just created from the list of databases on phpMyAdmin.
  4. Click on Import in the top menu, select the SQL file of the database you want to import, then click Go .
  5. After the import is complete, repeat the same process for the next database you want to import until you have imported all of your databases.

Awesome. You have finished !

Once you have imported everything correctly, it's time to run XAMPP, start Apache and MySQL, and test your websites.

Other recommended resources

We also invite you to consult the resources below to take more ownership and control of your website and blog.

Conclusion

Here ! That's it for this tutorial. We hope that from now on you can update your XAMPP without losing your data. If you have any questions, you can ask them in the online form comment below.

However, you can also consult our resources, if you need more elements to carry out your projects of creation of Internet sites, by consulting our guide on the WordPress blog creation or the one on Divi: the best WordPress theme of all time.

Mostly share this article on your different social networks

...