• Hello,

    I currently have 3 multisite websites. Everything works fine. However, I would like the main site to be put on one of the two sites and not on the current one. How do I go about it?

    Is it complicated?

    I haven’t found a “tick” to assign to another site.

    I’m up to date with maintenance.

    Thanks for your help.

    DDX

Viewing 6 replies - 1 through 6 (of 6 total)
  • Ritik Tiwari

    (@theritiktiwari)

    Hey @ddx2, you can follow the below steps

    Step 1: First backup all your files and database.

    Step 2: Now set the site you want as primary site

    • Access the database and change the name of the tables.
    • The main table should have a blog_id = 1, which you can find on wp_blogs.

    Step 3: Update the wp_site and wp_sitemeta table

    • Update domain and path for your multisite network, and it should reflect the new main site in wp_site table.
    • Look for the meta key site_admins and ensure that the admin user(s) for the new main site are listed in the wp_sitemeta table.
    Thread Starter ddx2

    (@ddx2)

    Hello @theritiktiwari ,

    Thanks for all

    Step 1: OK

    Step 2 : When I change the name of the DB, there will no longer be blog_ID=1, how will the system understand? I’d like to assign the new site directly.

    Step3:

    This one seems complicated to me, can you do some printscreen to help me understand?
    Thank you very much for your help.
    DDX

    PS: Is it possible to write to you privately so as not to overdo my request, I’m not an expert, sorry.

    • This reply was modified 1 day, 1 hour ago by ddx2.

    Hey @ddx2, can you please tell me what kind of multisite you have, subdomain or subdirectory ?

    Could you share the screenshot of wp_site and wp_blogs table, if possible ?

    • This reply was modified 1 hour, 52 minutes ago by Ritik Tiwari.
    Thread Starter ddx2

    (@ddx2)

    Hello @theritiktiwari ,

    I Think subdirectory

    • This reply was modified 1 hour, 36 minutes ago by ddx2.

    Hey @ddx2

    Let’s say you have three websites

    • example.com – The Main Site
    • example.com/site2 – The Site 2
    • example.com/site3 – The Site 3

    If you want the content of example.com/site2 show as the main site with example.com domain, you need to change the domain name that is pointed in the database.

    • In wp_blogs table , swap the domain and path.

    Update the wp_options table.

    • Search siteurl and home and change the URL there.

    Update the domain in the wp_site table.

    Now in the network admin dashboard, the tag of the main site, if you want to change that, you have to make changes in the wp-config.php file.

    • Search define( 'BLOG_ID_CURRENT_SITE', 1 ); and replace 1 with the blog ID that you want to show as the main site.

    Make sure to backup your data.

    Thread Starter ddx2

    (@ddx2)

    Thanks @theritiktiwari

    Possible to have your email?
    Mine: [email protected]

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.