• Hello, hopefully someone here can help me out.

    BACKGROUND: I have a multisite network that hosts several sites, and I’m using the domain mapping plugin to give each site its own domain. Also, it is a sub-directory install.

    ISSUE: I have purchased the pro version of WPSSO for one of the sites in the network. This site (we’ll call it clientsite.com) is not the networks primary blog or domain. The network has its own domain (we’ll call it network.com). Because plugin updates are done through the network, I need clientsite.com to be the domain that the network dashboard is found so that the plugin license I have will work. The license is tied to clientsite.com.

    RESEARCH: From what I’m reading, it sounds like I should be able to change the php constants “DOMAIN_CURRENT_SITE” to “clientsite.com” and “BLOG_ID_CURRENT_SITE” to “2” (clientsite’s id). But when I do that and log into clientsite.com/wp-admin/ and then click the network dashboard, I get a redirect loop going from clientsite.com to network.com and back.

    My original network constants are as follows

    define('DOMAIN_CURRENT_SITE', 'network.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    What I’ve tried and what I understand (possibly incorrectly) should work

    define('DOMAIN_CURRENT_SITE', 'network.com');
    define('PATH_CURRENT_SITE', '/clientsite/'); // network.com/clientsite/ is the site's original path. Which is mapped to clientsite.com
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 2);

Viewing 1 replies (of 1 total)
  • Hi Pleek,

    I have a feeling it won’t be that easy. While updating the WP-Config file is correct you may need to dive into the DB itself. I would suspect that there are references to the old site URL within the Database.

    You may need to change the below to reference the other 2 instead of 1.

    define(‘SITE_ID_CURRENT_SITE’, 1);

    Also, I would look at the following article from WP Engine, https://wpengine.com/support/how-to-change-a-multi-site-primary-domain/. This should be first but make sure you have a GOOD backup of your entire setup before diving in to make these changes.

Viewing 1 replies (of 1 total)
  • The topic ‘Multisite Change Default Site’ is closed to new replies.