CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Multi-Site functionality »
  • Is it possible/recommended to share a Drupal DB with multi-site?
Pages: [1]

Author Topic: Is it possible/recommended to share a Drupal DB with multi-site?  (Read 879 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Is it possible/recommended to share a Drupal DB with multi-site?
September 28, 2013, 03:34:02 pm
I am in the process of planning a multi-site using CiviCRM 4.3 and Drupal 6.     The contacts in CiviCRM do not need to be segregated, the same staff members will have access to all contacts no matter which Drupal site they came from.  This environment makes heavy use of CiviEvent, and all people that register for an event will need to be in a single participant list.

The only differences between the 2 Drupal sites ( other than the URL of course) will be the Drupal theme and the content and Drupal blocks shown to a visitor.

Currently I have 1 database for Drupal ( named: pog_main) and 1 database for CiviCRM ( pog_crm).    Is it possible or recommended to have both Drupal sites share the 2 existing databases?  Or do I need to create a new Drupal db for the new site?

Thanks,


Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Is it possible/recommended to share a Drupal DB with multi-site?
September 28, 2013, 06:09:23 pm
Your sites can share the same database. You should use the $civicrm_setting global variable to set url related settings & also the cms reference to the users table (you should find that stuff on the wiki). You can do that conditionally in civicrm_settings.php based on the URL.

A limit of this approach is civimails as, unless you set up a domain for each site - which is the next step up in complexity - civimails that go out will have links pointing to the url the cron runs on, rather than the url they were generated from. If this is a problem for you, or if you want other configuration differentiation,  I think you need to need to consider having multiple domains (ie. entries in civicrm_domain. This is doable but there is not an automated set up process & there are some gaps in the documentation)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Multi-Site functionality »
  • Is it possible/recommended to share a Drupal DB with multi-site?

This forum was archived on 2017-11-26.