Moving Multisite to a New Domain (Without Errors!)

If you’ve finally bought the domain you’ve had your eyes on for some time or you’ve found an even better one for your Multisite network, you’ll need to make some adjustments to your WordPress installation before you can use it.

If the physical location of your Multisite suits you fine and you don’t need to switch servers – just your domain – then this handy guide is for you. Moving the domain of your Multisite network isn’t as straightforward as moving a single install, but it’s still possible to make the switch.

The process isn’t yet fully automated so you’ll need to edit your database and files, but you can use plugins to significantly speed up the process.

Moving your Multisite’s domain doesn’t have to be a difficult. Today we’ll cover how to easily make the switch – and without error.

Basic Housekeeping

Before we begin, backup your entire site. This includes both your files and databases. This is a WordPress best practice to ensure your site will remain safe and can be restored if you make a mistake.

There are many tools that can help you do this such as our Snapshot plugin, VaultPress, or manually via FTP. Once you have everything backed up, you can continue to the next step.

 Quick File Edits

Locate your wp-config.php file in the base of your install and find the following snippet of code:

Not too far above that line, you’ll find the following code. Change the 'DOMAIN_CURRENT_SITE', '' to list the new domain you wish to use by replacing

Below this code, add the following two lines, and be sure to replace with the actual domain you wish to use. Be sure to also add it above the line “That’s all, stop editing!”

Adding the www. prefix is entirely up to you. The only difference between adding it in or leaving it out is just the way it looks in the address bar. It’s simply a style choice.

If your new domain name has an SSL certificate assigned to it, be sure to type https:// with your domain rather than the default http:// to make sure visitors are automatically directed to your secure site.

We’re almost done, but in order for the changes to really work you also need to update your database tables. This is the most important part. If you get it wrong, it could completely break your site. No pressure!

Edit Your Datatbase

This is the most difficult part of the process. You’ll need to know some key information before you’re able to make the necessary changes.

If you don’t remember your login details, they can be found in your wp-config.php file and will look similar to the code below. You will find your username listed beside DB_USER and your password beside DB_PASSWORD, both in quotations.

The name of the database that holds your site will be listed beside DB_NAME. You will need to know this in order for the changes to work.

For a quick reference, this is a list of the main tables you will need to update with your new domain name:

  • wp_options > siteurl
  • wp_options >home
  • wp_site
  • wp_sitemeta > siteurl
  • wp_blogs > domain (change this for all instances that use your old domain)
  • wp_#_options > siteurl (the “#” refers to the blog ID of additional sites in your network)
  • wp_#_options > home
  • wp_#_options > fileupload_url

If your network is large, you’ll need to sift through multiple pages. If this is the case, you’ll see the page navigation listed under the search box and your database name.

Login to phpMyAdmin through cPanel and find your database name on the left-hand side in the menu and click on it. This will populate the main content area with a list of all your tables.

Your tables are loaded in phpMyAdmin when your database name is clicked in the menu
Keep in mind that if you have multiple databases under one single user, you will need to click the “+” button beside your username to find the database for your Multisite install.

Find the table called wp_options and click on its name. If you changed the prefix of your database tables, it will not appear as the default wp.

Another list will appear and in it find the option_name called siteurl. Click on its “Edit” link and change the domain to the one you wish to use.

Click the edit button on the same line as siteurl to change it
In addition to clicking the edit button, you can also double click the option_name to open the editing page. Use whichever method is most comfortable to you. Don’t forget to save your changes.

Don’t forget to keep the http:// in front of the domain or https:// if you have an SSL certificate attached to the domain. If you do not include one of these, your site will not work.

Once you’ve made the necessary changes, make sure “Save” is listed in the drop down box below the text field and click the “Go” button to save your changes.

You can save the database table by clicking the "Go" button at the bottom of the page
You can also choose what the next action will be once the table is saved. I have selected “Go back to previous page” since there are more changes that need to be made.

Once you’re back to the previous page, follow the same steps for the other tables that are listed above.

Search and Replace for Other Tables

This is the trickiest part. You will need to replace other instances where your database tables refer to your old domain.

Start by making sure your database is selected and not one of its tables. Click the “Search” tab at the top of the page and enter your old domain name into the “Words or values to search for” field.

Under “Find,” select the radio button for “the exact phrase,” and “Select All” under the “Inside tables” field. Finally, click “Go” on the bottom, right-hand side of the page.

The search tab in phpMyAdmin allows you to search all tables when your main database is selected
Make sure to keep the “Inside column” field blank to make sure your whole database is searched rather than specific values inside each table.

You’ll see a full list appear with all the tables in your database. The results which have matches listed are the tables that require editing, just as we covered in the last step.

Search results page in phpMyAdmin with the number of matches listed on the left of each table
A really long list will appear once you performed a search so make sure you scroll down to the very bottom to make sure you have found everything that needs to be changed.

When you find a search result with a number higher than zero beside the word “matches,” go ahead and click the browse button on the right of the listed item to see the full table with the values that need changing.

Don’t forget that all image links and the upload path need to be changed in order for images to be visible on your site so pay special attention to these areas in your tables.

There are a few tables – listed below – that don’t require any changes, even if they are listed in the search results. If you edit them, you will break your site. If you would like more information on this, visit Changing the Site URL in the WordPress Codex.

  • dashboard_incoming_links (this has been unused since version 3.8 so you won’t see this in newer installs)
  • wp_posts > guid

Using Plugins

It’s also possible to search and replace all instances of your old domain with a plugin. It saves a lot of time and also ensures you don’t make – or miss – any changes that will wreck your site.

Search and Replace is a plugin that is regularly updated and is also completely free. While the search options are straight forward, be sure to review them carefully before making any changes as choosing the incorrect options can cause your site not to work.

Be sure to use the “Search for” and “Replace with” text fields at the bottom of the options page for the best results.

The "Search for" and "Replace with" text fields at the bottom of the Search and Replace plugin options page
Don’t forget to check all but one table in the “Search in” section above these fields. Leave “GUID” unchecked, otherwise, it will break your site.

WP Migrate DB is another plugin that is regularly updated and it’s also incredibly easy to use. The only drawback is that using it with Multisite is a premium option.

There are many other plugins that are wonderful and work really well. These ones are simply plugins that I have used successfully in the past so I know they work. Use whatever option that you like the best.

Additional Configurations

Make sure your new domain’s DNS records point to your site’s IP address. Each hosting company is a little different so be sure to ask them for assistance if you’re not sure how to update these records yourself.

If you have a sub-domain install of Multisite, be sure wildcard domains are enabled in your new domain. This will ensure new sites are created without error.

Update Your 301 Redirects

This is the final step which may not apply to you. If you haven’t made any custom changes to your .htaccess file, then you’re done!

If you have made changes to this file, such as by adding permanent URL redirects, you will need to update them to replace your old domain name with your new one. Below is an example of what you need to edit.

Just be sure to replace the example links as well as to the actual URLs you wish to redirect.

After you’ve done this, you’re all set to go. You can now go to your new domain and see your site.


Moving your Multisite to a new domain doesn’t have to be difficult or time-consuming and these steps should set you up for success. If you find something goes wrong, you can restore your site and try again.

You can also find more detailed information on moving your domain, you can check out the Changing the Site URL page in the WordPress Codex.

If you need to migrate your entire site to a new server or hosting company, you can find detailed instructions in our post Migrating WordPress (and Multisite!) to a New Server.

Have you used any plugins or tools for moving your Multisite domain? Which one is your favorite? Share your experiences and top picks in the comments below. 

17 Responses

  • Hey ChuckS,

    If it’s a new IP, you’ll need to update your db-config.php to reflect the new IP address.

    As for the databases themselves, if every database is in the same cPanel account, you could try doing a cPanel backup, or running a terminal command to backup the all of the databases.

    Search & Replace will search all tables for every blog inside the main database, but it may not reach out to the databases created by Multi-DB (haven’t tested that personally).

    You may need to manually back up each database, and then change the db-config.php file, updating the entries (database users, passwords, database names) to reflect the ones on the new server.

    You may wish to have someone handle the migration of this for you, like one of our Pros:

  • Site Builder, Child of Zeus

    I don’t recommend doing a simple search and replace on all database tables. You’ll run into trouble with serialized data (stores the length of a string as well as the string). I use Interconnectit’s serialized search and replace script: This plugin can also be used – based on the same script and maybe easier to use:

  • Design Lord, Child of Thor

    Rather than manually updating the database, you’d be better off using this:

    Interestingly enough, I just did this whole process two days before this was posted. It’s not hard, there are just a lot of steps, and if your host doesn’t quite have it together (mine didn’t) and doesn’t get some of the settings right on the dedicated IP, there can be issues. Using that script from Interconnect/IT made it MUCH easier than it would have been if I’d been trying to update the database manually though.

    • Hey Raevenne,

      I definitely agree! Using plugins and other tools to handle the search and replace for databases is way better. I just wanted to mention it for completeness.

      That’s very true, your hosting company needs to have all their ducks in a row. I’m glad you were able to get through it easily.

      Thanks for posting another search and replace alternative. You’re fantastic!

      Jenni McKinnon

  • The Crimson Coder

    Hi Jenni
    Thanks for this great post, every time i think i almost know everything i need to know about multisite, i new post like this, “take me back to the earth”( spanish statement) in order to say to me ” man, you need to learn more…:))”
    OK. I have a couple of doubts ( from a novice:))
    1º the edition of the config file is in the old one or in the new one? I supose that i have one multisite already created with a bunch of sites in it, and i want to migrate to another multisite recently created from scratch in another domain, in the same host. So in which one do i edit the config file, with the steps listed above.
    2º Related with the search an replace, i was watching the plugin given by one fellow above ( and apparently looks like fine. And my question is…May i do all the searching and replacing of all my database with the plugin, or do i have to do something manually? And when i do this process, is this done for main main site (where the multisite instalatin is done) and all the other subsites?

    Thanks very much Jenni for your help

    • Hey wordev,

      I know what you mean. :) There seems to be loads to learn when it comes to WordPress.

      To answer your questions:
      1. If you’re also migrating your Multisite, the easiest and best way to go about this is to save the wp-config.php file of your fresh install (with the new domain name already typed in). I wrote a post for migrating Multisite that you can check out here for more details:

      2. Yes, you can do all the searching and replacing with a plugin, but you need to make sure it’s Multisite compatible so it will change the domains for your main sites as well as all your additional sites.

      Hope that helps!



  • Site Builder, Child of Zeus

    Hi, this looks like the best post I have found on this process.

    I have a “test” subdomain I have done all my development work on. I want to migrate that site to my main “live” domain, on the same server.
    I need to keep the “test” subdomain intact, as I will be adding more features for the client (membership and ecommerce). We will be adding sites to the network as we expand, as well.

    As I read through this post, it seems if I do everything that is in here, I will loose my test subdomain. Do I understand this correctly?

    How do I move the “test” to “live”, and keep the “test” intact?
    Right now on “live” there is a site running that I want “test” to replace.
    When I am finished, I need “live” to be the same as “test”. The “live” version will be the active site, while I continue to develop on the “test” site.

    Thanks, great post – right to the point.

  • New Recruit

    For those interested, I’ve been using this solution for hosting my own web site, . For years, I was struggling with the inconveniences of shared server (slowness, down times, suspicious IP, unable to run my own process, etc.) Then I’ve found this VPS server, with SSD, and at a very affordable price. I couldn’t believe that only 5 USD a month were enough to get this kind of solution, but it is. No strings attached, they even give you 10 USD to try the server with the coupon DROPLET10. You can take a try for free signing with the following URL ( ). When you’re satisfied you can migrate your site to this server. A convenience for me is that they don’t ask for annual payments, if you like to stay with them you can pay monthly, just 5 USD a month. That is very comfortable for me.

  • New Recruit

    Thanks for this. I’m new to WordPress, have been trying to move my site from subdirectory to the main site. All the information I see on the internet keeps mentioning changing WordPress URL to my domain URL in Dashboard – settings – General.

    The problem is I can’t seem to see these options (WordPress URL and my domain URL ) there. I’m not really sure why. Maybe because I’m running multisite. I updated my WordPress to the latest version 4.6 some days back though.

    Please help. Been searching the internet since…

Comments are closed.