I usually have 3 simple and separate tasks for a XAMPP upgrade or any general development environment migration (for example when moving to a new Windows or Mac hardware).
- Moving the source codes, files and assets: copy the www folder with all the project source codes local virtual host domains
- Apache configuration: edit the httpd.conf and httpd-vhosts.conf files
- MySQL migration: migrate the database
Usually I have a separate www folder configured with vhosts.
I only change the following line in httpd.conf because I like to develop on port 8080.
And as a habit (Debian and FreeBSD) check if the vhosts file is included:
The httpd-vhosts.conf file has multiple entries (for each project or local domain name):
<VirtualHost *:8080> ServerName client1.san ServerAlias www.client1.san DocumentRoot C:/xampp/www/client1 </VirtualHost>
A fresh copy of a pristine MySQL installation with PHPMyAdmin has the following databases:
So when migrating I try to avoid copying over those five databases / schema.
While it might be OK to dump the database via PHPMyAdmin, it’s not a good idea to restore it via a web interface. For example my combined database size is almost 1 GB.
So ensure you have a decent max_allowed_packet size in specified in my.ini:
Then run the database restore command manually from the command line. For example:
mysql -u root < databases_to_migrate.sql