Support » Networking WordPress » Multisite – Change "main" site?

  • Resolved swhinck

    (@swhinck)


    Hello all,

    I have my “main” site, mysite.com. and my sub domain sub.mysite.com.
    Is it possible to reverse roles and if so how do I do so?

    So when someone types in mysite.com I would like that they see the theme and images which are currently shown in sub.mysite.com.

    Any help appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    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. You’ll probably have to do that in teh DB directly.

    Be VERY careful!

    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.

    hmm im not too comfortable with editing the DB.

    Let me look into how to export/import the posts.

    Thanks Ipstenu!

    no luck. I guess due to custom post types the importer wont work.

    Guess I am going to have to look into the DB and see what I can do.

    Ok thanks again Ipstenu, took some faneggling to get it all to work but editing the DB was the way to go.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multisite – Change "main" site?’ is closed to new replies.