Answers.Body: <p>There is documentation covering setting up multisite CiviCRM on multisite Wordpress <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Multi+Site+Installation#MultiSiteInstallation-C.WordPressmulti-sites" rel="nofollow">here</a>.</p>
  
  <p>Additionally, this is an example of the code I put into civicrm.settings.php to set the base URL based on the domain:</p>
  
  <pre><code>  $multi_site_path = explode("/", $_SERVER[REQUEST_URI]);
    if ($multi_site_path[6] == "cron.php") {
        $multi_site_choice = $_GET["site"];
    } else {
        $multi_site_choice = $multi_site_path[1];
    }
  
    switch ($multi_site_choice) {
  
    case 'hcnmd':
      define( 'CIVICRM_DOMAIN_ID', 2 );
      define( 'CIVICRM_DOMAIN_GROUP_ID', 74);
      define( 'CIVICRM_DOMAIN_ORG_ID', 67459);
      define( 'CIVICRM_UF_BASEURL'      , 'http://hcn.local/hcnmd' );
      $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://hcn.local/hcnmd/wp-content/plugins/civicrm/civicrm';
      break;
  
    case 'hcfat':
      define( 'CIVICRM_DOMAIN_ID', 3 );
      define( 'CIVICRM_DOMAIN_GROUP_ID', 65);
      define( 'CIVICRM_DOMAIN_ORG_ID', 82031);
      define( 'CIVICRM_UF_BASEURL'      , 'http://hcn.local/hcfat' );
      $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://hcn.local/wp-content/plugins/civicrm/civicrm';
      break;     
  
    ...more multi-site config here...
  
    case 'wp-admin':
    case '':
    case false:
    default:
      define( 'CIVICRM_DOMAIN_ID', 1 );
      define( 'CIVICRM_DOMAIN_GROUP_ID', 84);
      define( 'CIVICRM_DOMAIN_ORG_ID', 1);
      define( 'CIVICRM_UF_BASEURL'      , 'http://hcn.local/' );
      $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://hcn.local/wp-content/plugins/civicrm/civicrm';
      break;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-12T11:07:12.663Z
Answers.Text: Thank you for posting this. I'm sure it'll help others trying to achieve something similar.
Answers.UserDisplayName: Christian Wach
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-31T16:03:44.890Z
Answers.Text: Are the CIVICRM_DOMAIN_GROUP_ID and CIVICRM_DOMAIN_ORG_ID constants needed? They don't appear to be in the CiviCRM codebase --- at least not for WordPress.
Answers.UserDisplayName: Martin_W
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-31T16:16:40.880Z
Answers.Text: I believe those are present in the [Multisite Permissioning](https://civicrm.org/extensions/multisite-permissioning) extension; if you're not using that, I imagine they're not necessary.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-11T18:03:22.120Z
Answers.LastActivityDate: 2016-02-11T18:03:22.120Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>This question arose from <a href="https://civicrm.stackexchange.com/questions/9533/network-error-when-pushing-civicrm-button/9541?noredirect=1#comment9473_9541">this discussion</a>.</p>
  
Tags: <wordpress><multisite>
Title: How can you set up CiviCRM multisite with Wordpress multisite?
ThreadText: # How can you set up CiviCRM multisite with Wordpress multisite?
  
  (Asked by: username_0 on 2016-02-11)
  
  This question arose from [this discussion](https://civicrm.stackexchange.com/questions/9533/network-error-when-pushing-civicrm-button/9541?noredirect=1#comment9473_9541).
  
  **Tags:** wordpress, multisite
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-02-11. Score: 4
  
  There is documentation covering setting up multisite CiviCRM on multisite Wordpress here.
  Additionally, this is an example of the code I put into civicrm.settings.php to set the base URL based on the domain:
    $multi_site_path = explode("/", $_SERVER[REQUEST_URI]);
    if ($multi_site_path[6] == "cron.php") {
        $multi_site_choice = $_GET["site"];
    } else {
        $multi_site_choice = $multi_site_path[1];
    }
  
    switch ($multi_site_choice) {
  
    case 'hcnmd':
      define( 'CIVICRM_DOMAIN_ID', 2 );
      define( 'CIVICRM_DOMAIN_GROUP_ID', 74);
      define( 'CIVICRM_DOMAIN_ORG_ID', 67459);
      define( 'CIVICRM_UF_BASEURL'      , 'http://hcn.local/hcnmd' );
      $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://hcn.local/hcnmd/wp-content/plugins/civicrm/civicrm';
      break;
  
    case 'hcfat':
      define( 'CIVICRM_DOMAIN_ID', 3 );
      define( 'CIVICRM_DOMAIN_GROUP_ID', 65);
      define( 'CIVICRM_DOMAIN_ORG_ID', 82031);
      define( 'CIVICRM_UF_BASEURL'      , 'http://hcn.local/hcfat' );
      $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://hcn.local/wp-content/plugins/civicrm/civicrm';
      break;     
  
    ...more multi-site config here...
  
    case 'wp-admin':
    case '':
    case false:
    default:
      define( 'CIVICRM_DOMAIN_ID', 1 );
      define( 'CIVICRM_DOMAIN_GROUP_ID', 84);
      define( 'CIVICRM_DOMAIN_ORG_ID', 1);
      define( 'CIVICRM_UF_BASEURL'      , 'http://hcn.local/' );
      $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://hcn.local/wp-content/plugins/civicrm/civicrm';
      break;
  
  > **Comments:**
  > **username_1**: Thank you for posting this. I'm sure it'll help others trying to achieve something similar.  
  > **username_2**: Are the CIVICRM_DOMAIN_GROUP_ID and CIVICRM_DOMAIN_ORG_ID constants needed? They don't appear to be in the CiviCRM codebase --- at least not for WordPress.  
  > **username_0**: I believe those are present in the [Multisite Permissioning](https://civicrm.org/extensions/multisite-permissioning) extension; if you're not using that, I imagine they're not necessary.  
  
  ---
  
  