Support » Networking WordPress » Switching Primary site with Subdomain

  • Resolved d_random


    Here is situation that I have been trying to figure out:

    I have a primary site that I no longer want to be my primary site of my multisite. I want to make it a subdomain and make a subdomain I already have set up my primary site.

    I have tried this tutorial , but it just swapped the url for the primary and subdomain.

    How do I swap a primary site and a subdomain?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Use export/import to swap the contents of the sites?

    I gotta swap the whole thing, plugins, etc.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    You could try doing it in the DB. Change wp_options and wp_posts et etc to wp_x_* Then change wp_2_ to wp_ and THEN change wp_x_ to wp_2_

    But you have to be VERY careful to only change the tables required.

    Sorry for being dense Ipstenu, what do you mean wp_x_*?

    Each blog has a unique ID number.

    Go to Network Admin / Sites, hover your mouse over any blog’s title and you’ll see the ID number in your status bar on the end of the link URL. It will look like <site home>/wp-admin/network/site-info.php?id=1125, where in this case 1125 is the unique ID.

    The ID number is used to identify the set of database tables for each blog. They all have names like wp_1125_posts, wp_1125_comments etc.

    Ipstenu is suggesting you first rename the database tables for the home blog, which don’t have an ID number, temporarily to something else, using the x.

    Thanks dgilmour!

    Thanks, that worked out!

    I also had to switch the wp-content/uploads directory with the blogs.dir/X/files directory and the references in the posts.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Switching Primary site with Subdomain’ is closed to new replies.