• Hello there,

    Thank you in advance for reading through my issue. I am new to WP Multisite so could really use someone’s help.

    I would like to replace the primary site on my WP network with another site on my network. The primary site is accessible through https://www.domainname.com and is using the wp_ prefix for the DB table. The site that I want to replace it with is accessible through temp.domainname.com and is using the wp_23_ prefix.

    I found this article (https://wpengine.com/support/how-to-change-a-multi-site-primary-domain/) that I think suggests that I can do this by updating a few database values, but that seems a little too easy.

    I have admin access to my server and can change the wp-config or .htaccess files etc., as needed.

    I know this is a lot to ask, but would anyone be able to outline the steps I would need to accomplish this? Your help is greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Will you check changing these two lines in your wp-config.php?

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

    to

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

    Thread Starter arrizvi

    (@arrizvi)

    Hello,
    Thank you for the suggestion. I tried these changes but they didn’t seem to have any effect. After updating my wp-config.php file, I tried to loan my site on a browser with a cleared cache. Still redirected to my original site.

    Here are the values I updated:

    define(‘DOMAIN_CURRENT_SITE’, ‘www.domainname.com’);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);
    define(‘WP_HOME’,’https://www.domainname.com’);

    At first, I only updated the two values you suggested, then I also updated the urls to the temp.domainname.com subdomain. No cigar.

    Any other advice would be appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Replacing primary site with another site on the network’ is closed to new replies.