Trying to migrate a WordPress Multisite with Domain Mapping

This may be incomplete information, but I’ve had problems with domain mapping on multisite systems with a similar configuration as posted in your question.

First, I would look at the htaccess of the main site. Make sure that any redirects is not domain-specific, so it uses something like this:

RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Then, make sure the WordPress part of the main site htaccess is also not domain-specific; use the recommendations in the Codex: https://codex.wordpress.org/htaccess adapted to your site.

Then, I have had to edit the Site Settings files for the sites. This is done via Network Admin, Sites, Edit the sub-site, and use the Settings tab. That will display all of the settings of that site. Make sure the two URLs at the top of that page have the full URL of the subsites.

This is where it gets tricky, and depends on your htaccess settings. You may or may not need to ensure that the ‘www’ part of is there (or not). So the value may be

https://www.someawsomesite.com/

or

https://someawsomesite.com

I don’t have good guidance on exactly what you need, since it depends on how htaccess is set up for the main site. I’d try the first example and see how it works.

Also, once you figure out the proper URL, you may need to go through any other settings to change any URLs in there – many plugins have absolute URLs in their settings.

Of course, you may want to ensure you have a current backup of your database, in case things get really borked.

Hope this helps. I haven’t seen any specific guidance that helps, but the above might get you started. (I’m interested in the solution you use, BTW.)

Leave a Comment