• Hi I’m working with a multisite install and I’ve created a subdomain (test.domain.com) that I’m using a staging site. I’m almost ready to move it from the sudomain to the main domain (www.domain.com) and I’m trying to figure out the necessary steps.

    The main domain already lives on the multisite install. Do I need to move files or should I just change the test.domain.com url to https://www.maindomain.com and do a search and replace in the database

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Bet Hannon

    (@bethannon1)

    Just so I understand: you created a multisite network so you could develop a new (updated?) website, and now you want to launch the new site on the domain of the main site in the network. But I get that right?

    Here’s the big question for you: do you need to end up with a multisite network? Or, did you simply put this together for development purposes, and now the network can go away?

    What you need to end up with will make a big difference in how you need to proceed.

    Thread Starter jcrowl2000

    (@jcrowl2000)

    Yes we have a multisite network set up with multiple domains which we need to keep, serveral sites live on this network! One of those domains I have set up as test.domain.com for staging purposes. Now the sites is almost finished and I need to move if from one domain (test.domain.com) to another (www.maindomain.com). The https://www.maindomain.com is already apart of the network. Thanks in advance for your input!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Yes, you can. But be careful (and I have not tried this since 3.0 …)

    A couple things are going one.

    1) You need to change your blog IDs in the wp-config.php file:

    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    That means Site ID 1 is the main site. IF you change that, another site will be the main site.

    2) You have to change your blog URLs around so it knows sub.mysite is now mysite. Do this in example.com/wp-admin/network/sites.php and EDIT the site there. Make sure you check the home/siteURL box and change the sub site to MAIN first, then the main to sub.

    3) Search/replace to fix all your URLs in posts for images etc.

    Be VERY careful!

    I explain this in a lot more details in https://store.halfelf.org/ebooks/wordpress-multisite-110/ (pay what you want ebook), but the basics are that.

    A second option would be to make new-sub.mysite.com, export all the posts from mysite.com into there, then wipe out mysite.com’s posts and import all the ones from sub.mysite.com

    It’s probably safer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multisite – Moving subdomain to main domain’ is closed to new replies.