I have previously write about migrating WP using the database search/replace php tool. But migrating a MultiSite intalation is a little bit different.
This is the first time I am playing with WordPress and the multisite feature, so I am learning from my mistakes. There is a small change that I missed the first time I have read the documentation in WP Codex about Moving WordPress:
If database name or user changes, edit wp-config.php to have the correct values.
Did you notice, the small “edit wp-config.php” in there. Well, I didn’t!!
Not doing this adjustment will end up in some errors on the multisite part. When trying to do to your Super Admin Dashboard you will be redirected to the old site domain and not be able to access the multisite dashboard menu.
This is due to the changes that you have done to activate multisite in your Super admin area, under Settings / Network configuration.
So to do this the right way you will have to edit the wp-config.php as fallows:
1 2 3 4 5 6 7 8 |
/* Multisite */ define( 'WP_ALLOW_MULTISITE', true ); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); define('DOMAIN_CURRENT_SITE', 'my-new-domain-name.com'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); |
Please note that I am not putting http:// nor the trailing slash / after my-new-domain-name.com
Prepending your domain with www. depends of your preferences. I prefer no www and I have my own arguments for it, but this is another subject.
Well, this is all I had to say about this. It’s really nothing, but it made me lose a lot of time before I figure it out. Next time I will be paying more attention to the documentation. RTFM as other say 😉