Support » Networking WordPress » How to switch domains (root, non-root) in Multisite

  • I have a subdomain install network of 100+ sites, and the root domain is set to root-name.com. I would like to replace it with one of the sites in the network – network-domain.com.

    After that network-domain.com would become the root domain, and root-name.com would be one of the sites of the network.

    I am sure it is possible, but what would be the best way to do it?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter json21

    (@json21)

    When I go to root-domain.com/wp-admin/my-sites.php I get a list of all the sites. When I click on visit on the root site, it is showing something like this:

    http://www.root-domain.com/

    When I click on any of the other sites, it would show something like this:

    http://site-name.root-domain.com/ (yes, it is always showing the same root domain in all 100+ sites, and the name of a sub site as a subdomain)

    I figured out a way of searching and replacing the domains in MySQL database (change site-in-network.com to some-fake-name.com, change root-domain.com to site-in-network.com, and change some-fake-name.com to root-domain.com afterwards; 3 steps and it should work).

    I am not sure what I should be searching and replacing for, and in what WordPress table / tables I can verify this information.

    Would I be searching for “site-name.root-domain.com” and replacing it with “some-fake-name.com”, then “root-domain.com” with “site-name.root-domain.com” etc. Or should I be working on FULLY QUALIFIED DOMAINS ONLY (the general problem here is that I am not sure what gets stored in the database – is it what am I seeing in root-domain.com/wp-admin/my-sites.php, after clicking “Visit”?) “site-in-network.com to” “some-fake-name.com”, “root-domain.com” to “site-in-network.com” etc

    The task should not be very difficult, even though it might sound a little advanced. I just need to know exactly what strings of text I am looking for, and where to find them in the database.

    Thank you.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Since these are MAPPED domains, you really can’t without moving WP.

    However are you sure you need to switch them around? You can just map domains to get site-name.root-domain.com it’s own domain name.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to switch domains (root, non-root) in Multisite’ is closed to new replies.