Multi-site, single codebase drupal 6 installation using prefixed tables to share common data.

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Nicholas Llewellyn's picture

Hi there,

I'm attempting my first multi-site, single codebase drupal 6 installation using prefixed tables to share common data.

Background

Looking from the outside, I think the best way to explain my reasoning for this configuration is going to be module management, and to ease the development of the core facilities the site(s) will offer.

I'm attempting to split the rather large modules apart so I end up with subdomains offering the features the users require, here is the basic layout.

  1. http://www.website.com - Panels and views based community with links to the other sites Organic Groups, Forum, Story, blog, images, event
  2. http://shopping.website.com - UberCart, Catalogue and Invoicing
  3. http://support.website.com - Job Tracker (later to use project management or custom module managing feature requests)
  4. http://marketing.website.com - Civic CRM* (Supplier management, customer mangement & marketing using UberCart CiviCRM Integration)

*Civic CRM is not yet set up.

I like the idea of taking the shopping site offline for maintenence, whislt I update UberCart, install a new feature, leaving the community and support site up and running.

I'm hoping to to share certain modules, i.e. Login Toboggan and keeping the primary site module separate, i.e. UberCart. So I can develop similarly themed sites with different content and different menus. I will be keeping things like Admin Menu separate due to the menu structure, it requires no config so there are no settings to consider, but it appears to be cached for each site.

Progress

I've got the sites set up running from a single code base using table prefixing in one database, and am about to start slecting which tables require 'sharing'. I have altered the default domain for cookies to 'website.com' but then came to the realisation, I don't know what the core tables all do in Drupal 6!

I've attempted to share some tables between sites, keep copies of certain tables for each site and leave others as dedicated for the modules which are running specifically on those sites.

I am basing my decisions soly on table names which are pretty good (not some arbitrary 'code' table names I have seen in the past), and my rudimentary understanding of previous versions of Drupal. I'm about to implement the following configuration and test if it does what I expect. I thought I'd share this with you and then ask some questions.

Table removed is was messing up formatting on page, see Attachment db_tables.ods

Question 1

caution! Multiple questions below this line!

I've found resources on sharing users and keeping content separate in Drupal 5x. I'm about to dive into this in 6 using the above table format and altering settings.php prefixes, but I'm wondering about some of the specific tables and what options I have...

  1. _filters - a. Would it be possible to share this table to save re-creating filters on each site?
  2. _term_* & _vocabulary_* - b. Will this need to be copied for individual sites as it is related to content? c. Could I share it and not have to re-build the taxonomy for each site? d. Could I then use Taxonomy Menu for navigation and pull related content into the product page in UberCart?
  3. _blocks_* - e. Could I share (box and) blocks - i.e. a block containing discussions from 'www' on a page in 'shopping'? That was similar to the last question
  4. _node_* - f. Would I need to share all content to mess with blocks, taxonomy and filters, then and use something like the Domain Module to hide things from other sites?

Question 2

a. Does anyone have a link to a document which describes what the tables are used for, and what sort of data is created? A reference is what I'm looking for. I have been searching for two days now.

Until I return

Thanks for taking the time to read all this, my experiments may prove frutiful, I may have no problems at all. I'll update here if I find anything, for anyone else who comes across the same questions.

nick - out.

p.s. The table I creted isn't howing up properley so I've attached OpenOffice Calc document as well.

AttachmentSize
db_tables.ods12.52 KB

Comments

Mollom

Nicholas Llewellyn's picture

I editied the page and submitted but, Your submission has triggered the installed spam filter and will not be accepted. came up. I wanted to remove the link to the attachment in the center of the post as it was picked up as a WikiLink.

Aaah well...

Sites are too much hassle

Nicholas Llewellyn's picture

Sites are too much hassle for what I want to achieve. I'm going to have to manage with all modules in one place for all parts of the site I'm building.

On the bright side, it'll help SEO I suppose lol

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: