Migrating multisite WP, don’t forget to edit wp-config.php

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.

multisite migration super admin redirect to old place

This is due to the changes that you have done to activate multisite in your Super admin area, under Settings / Network configuration.

multisite migratian change url settings in htaccess

So to do this the right way you will have to edit the wp-config.php  as fallows:

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 😉

Leave a Reply

Your email address will not be published. Required fields are marked *