Drupal Multisite

Drupal multisite has many misconceptions. It's really easy, you want one database per site, and everything else is DNS. However, many control panels do strange and terrible things to your Apache and domain configurations, so you might be in a world of hurt. I recommend a dedicated VPS with a good base install of Linux (like CentOS), to keep everything nice and simple. My company Bryght will sell you one of those.

Assume all commands are relative to the root of your Drupal installation, which is also the root of your webserver's public files (e.g. your /var/www/html or /var/yoursite/public_html directory, or something like that).

Adding a new site as a new domain or subdomain


cd sites
cp -R default example.com

Subdomains like sub.example.com work exactly the same way.

Adding a new site as a subfolder


cd sites
cp -R default example.com.subdir
cd ..
ln -s . subdir

The symlink makes it so that the request just goes to the root, which ends up in Drupal's index.php. That file then correctly determines that example.com.subdir is the site you're looking for.

TO DO: this is a work in progress. I'll add links to handbook pages and such.