How can I change the domain name across our WPMU network

Since 2008, we have been using the domain name: with all blogs on sub-domains. We would like to change the domain to something like and redirect all requests to the blogs to the new domain.

For example:

would become

and the old address would redirect to the new address.

Can anyone advise us on how this might be achieved? I guess it will need the apache web server to be re-configured as well as changes to the settings in the database.

Thanks for any advice.


  • Jack Kitterhing
    • Code Norris

    Hi there Joss,

    Hope you’re well today and thanks for your question.

    Interesting, how many sites need to be changed? Do you have anything like Multi-DB installed?

    Technically even though you are using it at the moment, WordPress doesn’t officially support sub domains of sub domains and it can cause issues, this might make this migration a bit trickier than the standard migration.

    Are you using any caching systems (server side) including, Varnish, APC etc?

    Please advise and I’ll be able to post some info on how best to go about migrating to the new domain.

    Thank you!

    Kind Regards


  • uol
    • Design Lord, Child of Thor

    We have one WP multisite network with over 2000 blogs.

    I am suprised that you say WP doesn’t officially support sub-domains. We’ve been running it like this since 2008 and have used Automattic’s support service in the past and there was no questioning of this setup. It has never caused any issues in the past. Can you show me where it’s stated that it’s not officially supported?

    We use APC caching and do not use Multi-DB or anything similar. It’s all on one database.

    Thank you


  • Jack Kitterhing
    • Code Norris

    Hi there Joss,

    Hope you’re well today, I can’t find the article :slight_frown: I’ve asked my colleague @vaughan to find it.

    But if that’s how it’s been used for all this time, there isn’t really a reason why it shouldn’t work.

    I should make it clear that it’s not as such it isn’t supported 100%, more that a few plugins and some hosts do have issues with sub domains of sub domains in WordPress with wildcard A records.

    You’d need to find and replace the old domain to the new domain your DB, including the wp_options table, and if it’s defined at all in the wp-config.php, to do this, I’d highly recommend this script.

    Then you’ll of course want to move all your files and folders to the correct location on your server for the new domain location and re-start apache.

    While you are doing all this, I’d highly recommend disabling APC while your migrating, you’ll then want to setup some form of redirection for the old domains.

    You may also want to take a look at the following guides and

    Any issues, questions, need any clarification, please let me know. I’m here to help :slight_smile:

    Thank you!

    Kind Regards


  • Vaughan
    • Support/SLS MockingJay


    I can’t seem to find the article, it was a long while back, but Jack pretty much explained the summary of it. But if it works for you, then it works. Though it might not work on all server configs.

    Don’t forget once you have searched and replaced the references in the DB, you’ll need some 301 redirects in your htaccess to redirect from blogs. to sites. otherwise you might take an SEO hit with your site being longstanding.

    you’ll need to search for the old domains in the wp_options, wp_sitemeta tables especially.

    Then don’t forget to regenerate permalinks last of all, that should then hopefully regenerate any urls that are in transient tables or serial arrays.

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.