Multiple Drupal Sites With One Install

I've been trying to setup a system that allows me to maintain a single Drupal installation while having multiple sites which use it while maintaining different modules and themes.

Here are some requirements.

1) core application is not editiable by local users
2) local users can modifiy themes and modules

It looks like this is in the pipe line already.

For the meantime, I need to get things moving. So I did the following.

1) Installed a master copy of drupal in /var/www/drupal_master
2) In each of the installations I'm using it for, I create a symlink to /var/www/drupal_master to locally drupal
So I end up with /var/www/domainname.com/drupal -> /var/www/drupal_master
3) In /var/www/drupal_master/stites I create domainname.com
4) in /var/www/domainname.com, I add the following .httaccess:

RewriteEngine on
# Redirect root page to drupal home (if desired)
# NOTE: without trailing slash, external redirect to /drupal will
# be used and it will show up in browser. With slash, hidden.
RewriteRule ^$ drupal/ [L]
# Rewrite non-file/directory URL's to be under drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ drupal/$1 [L]

Unfortunately, it seems as though modules can't be site specific, so all installs share the same modules. This just means good configuration every time I setup an additional subdomain.

/var/www/drupal_master/sites ends up looking like this:

domainname.com1->themes/, settings.php
domainname.com2->themes/, settings.php
domainname.com3->themes/, settings.php
default->settings.php

One thing to remember when

One thing to remember when upgrading is to make sure to move both the modules and the sites directory in to the new install.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <code> <pre> <embed> <object> <b>
  • Lines and paragraphs break automatically.

More information about formatting options