How to update XAMPP for Windows

Update XAMPP
Update XAMPP

Introduction

This guide shows you how to update your XAMPP to a newer version.

Prerequisites

  • A running XAMPP

Step by step

I assume that your XAMPP is installed in D:\xampp.

  1. Backup all databases First, backup all your databases, run this command in the cmd Windows, you will get the file data.sql, copy or move it to D:\data.sql.

    D:\xampp\mysql\bin\mysqldump -uroot -p --all-databases > data.sql
    
  2. Rename the old XAMPP Stop all XAMPP's services and rename the XAMPP folder, for instance, D:\xampp to D:\xampp_old.

  3. Download new version Download the new version and install it to D:\xampp.

  4. Copy config files from old XAMPP From D:\xampp_old, copy and overwrite those files/folders to the new D:\xampp.

    mysql\bin\my.ini
    mysql\ssl
    php\php.ini
    apache\conf\httpd.conf
    apache\conf\extra\httpd-vhosts.conf
    apache\conf\extra\httpd-ssl.conf
    apache\conf\ssl.*
    
  5. Re-download PHP ext If you use additional PHP extensions, you must re-download a new version (Thread Safe x86) for your new PHP.

  6. Copy htdocs If you have existing sites in your old XAMPP htdocs directory, then copy that folder's content to the new install location.

  7. Restore databases Start XAMPP, open cmd and run this command to restore the databases:

    D:\xampp\mysql\bin\mysql -uroot -p < D:\data.sql
    

Check and make sure everything is OK, then you can safely remove the old XAMPP D:\xampp_old. Note: Tested with XAMPP 7.0.1, may work with other versions

Conclusion

You now have your XAMPP updated to newer version.