Hosting multiple sites drupal tutorial

Drupal's Mutlisite feature sounds like the Holy Grail for whenever you want to run multiple Drupal sites. However, the answer to "Should I use Multisites?" is best discovered by knowing what Multisites is and how it might benefit or hinder your objectives.

In this video, I provide an overview of Multisites vs. Multiple Sites, and hopefully, the insight necessary to decide.

The later part of the video runs through an optimized setup for using/running Drupal's multisites feature. It showcases an Apache configuration for better security (blocking more files), faster performance (fewer disk hits) and easier upgrading (a better way to update than using site maintence mode).


One thing I forgot to mention, in the video, with using Mulitsites was the way to implement cron.php. Assuming you have shell access, you can easily use a script to do this. For my particular multisite setup, I use a cron shell script and special thanks go to user gnat and the others in that thread for their work!

If you're looking for more information about using multisites then head on over to .

Submitted by Matt Petrowsky on Wed, 11/05/2008 - 22:20.

One thing I forgot to mention, was the loading order and using DirectoryIndex offline.php to put all sites into no access mode.

The DirectoryIndex apache directive needs to come AFTER reading in Drupal's .htaccess file (because Drupal's .htaccess declares index.php as the default).

So it would look like this.

# Keeping the drupal config in a different file makes it easier to manage

# Toggle APC cache
php_flag apc.cache_by_default 1

# Yeah, better performance - no hits to the file system
# Loading Drupal's .htaccess into memory is much better
AllowOverride none

# Define your own file limitations on drupal files

Order deny,allow
Include conf.d/ip.conf
Deny from all

# Read in Drupal default .htaccess file asif conf - easier CVS management
Include /home/drupal/drupal_root/.htaccess

# Changing the index file for all sites in a multisite install is easier
# done with an apache directive. Now you don't have to go into each site!
# You may also want to temporarily rename Drupal's index.php to something
# like so visitors can't get to it. ;)

# Sorry, no svn peeking

# Currently pointing back to drupal
# High traffic sites might want custom
# error pages, no need to load drupal
ErrorDocument 403 /index.php
Order allow,deny
Deny from all
Satisfy All

# Allow the .htacces files to be used in the sites folder where /files are stored


Hosting multiple sites drupal tutorial Most of hte Drupal

# Block off access to admin and devel - just in case

Order deny,allow
Include conf.d/ip.conf
Deny from all

Submitted by spoetnik (not verified) on Thu, 11/06/2008 - 05:13.

Submitted by Jerry (not verified) on Mon, 06/08/2009 - 20:33.

Bear with me I am a bit of a greenhorn.

There is nothing easier than following directions to the letter and getting expected results. But it is never quite that easy is it.

Unfortunately my broadband access is NOT static. As much as I pay it should be but alas that discussion is for someone else.

Would you provide an example of other options to use where instruction provides using a static IP. I would be most appreciative.

Submitted by Matt Petrowsky on Wed, 06/10/2009 - 01:40.

The example of using an IP is actually the most restrictive. There are a number of ways, including using a Cookie. using htpasswd or htdigest via either the httpd.conf file or via .htaccess files.

The best advice I can offer, beyond what the video covers, is to do Google searches on the keywords related to authentication. The links above will hopefully get you started.

Submitted by Jerry (not verified) on Sun, 06/14/2009 - 20:28.

A little push in the right direction is what was needed.

Submitted by Mark Ward (not verified) on Wed, 08/05/2009 - 13:35.

I have been looking for someone to put together a Drupal resource like this (that wasn't asking for a $300 subscription)!
Your production standards are top-notch.
The multi- vs multiple is just what I was looking for. I am now in the process of pouring through your other tuts.
I just wanted to say "Please, keep up the great work!"
If you are taking requests, I would very much like to see more on this subject as well as upgrade and back-up strategies.

On a slightly related note: I just discovered a new(beta) site.
It is a great resource for developers that allows for up to 3 separate installs (even includes D7) for FREE. (My favorite flavor)
The really cool thing is that you can share your customized installs with others.

Anyway, thanks again for the wonderful resource.
If there is anything I can do to help, let me know.

Submitted by mnorth (not verified) on Mon, 08/10/2009 - 10:10.

Win XP can view quicktime in firefox. just get the add-on. there is a linux quicktime viewer. try MPlayer, Quicktime 4 linux and there's an non open source one as well..i think its called Crossover.

Submitted by Max (not verified) on Wed, 10/14/2009 - 10:21.

Great video tutorial! Very easy to understand! Upgrading Drupal when you have a multisite installation setup is much harder than having a single site setup. If you put the time into upgrading each site on your multisite setup, the benefits of having this kind of setup outweigh running many servers each with it's own Drupal install. Read more about Drupal multisite installations at

Submitted by m8x (not verified) on Sun, 10/25/2009 - 10:57.

great video, great job, i just love to listen, it is very good to follow and great tips.
Love to see more.
I will check out the buttons coffee and more.

Submitted by Ashley (not verified) on Thu, 11/26/2009 - 02:04.

Hey that video was nice. And I was able to understand the diff. You only releases videos in your site? Only about Drupal? I would like to know?

Submitted by Anonymous (not verified) on Mon, 02/08/2010 - 13:54.

Your videos are terrific. Coming from a non-programming background, they are very helpful. I am trying to set up multi-site on an intranet and currently am not using a domain name but an IP address (actually using a virtual server). I notice that the hosts file for the apache server associates the IP address with 'drupal6' (without the quotes). Most of hte Drupal literature references or other references to domain names when setting up multisite. This generally makes sense in the public arena with web hosting etc.

My questions are if one is using an IP address for the default or root of Drupal and you wish to set up multiple sites using sub directories:

(a) do you name the subfolders for the new sites as "default.subdirectorysite1. default.subdirectorysite2, etc" or as ", etc"?

or (b) do you create a local domain name and change the apache hosts file to associate your default with, say, ?

Submitted by Anonymous (not verified) on Thu, 02/18/2010 - 10:50.

This was a very enlightening video. Sadly, after investigating, I found that Apache 1.3.x (the version our company is running) does not support the include directive in directory or virtual host contexts. Figured I'd just mention that for other folks who may have run into the same problem.

Submitted by Pam (not verified) on Fri, 04/23/2010 - 15:02.

I confused now. Which do you use a mutlisite (one drupal install and site setup under sites directory) or Mutliple Sites (multiple Drupal installs). Have start with Multisites and want to change to Multiple Sites for the reason you have stated. I am trying to figure out the directory structure to get it to work. So this is what I was thinking
www/ install and use the sites default directory or contributed modules and themes
www/ install and use the sites default directory for contributed modules and themes
Is this correct?

How does one configure the .conf files? What does one do when they do not have access to the conf files (share hosting) like you have. I can configured on my local development box but not on the live hosting site. Also I would like implement some the restrictions to the files install.php, robot.txt, update.php. etc. So there another way to do it.

Great site and videos I am always becoming back to the site for information. Keep up the great work.
Thank you,

Submitted by Jumi (not verified) on Wed, 07/07/2010 - 07:30.

Hi Matt,
Thanks for this great tutorial. I am on a shared hosting and would like to implement multisite/multiple sites. My sites (3 of them) will have the same features and perform the same basic functions (blogging), the only thing different will be the domain names. They won't generate alot of traffic - since they are personal blogs.

  1. Should i be doing multisite or multiple sites (i am not 100% clear) what do you think?
  2. How can i carry out the actions in your tutorial on a shared environment? Since i don't have access to .conf files - Can i do this in .htaccess files? If so, can you show how? Are there alternatives for someone in a shared environment? Can you create a mini tutorial for these please or point to some helpful links on how to do these?

Your time and attention is greatly appreciated. I look forward to your reply eagerly.

Submitted by Tim Sverduk (not verified) on Sun, 08/22/2010 - 05:56.

Related articles

Hosting multiple sites drupalThere are many reasons why a systems administrator or developer may choose to host multiple sites on the same server in a multisite configuration. For example, such a configuration could:...
Multi sites drupal hostingIf you are running more than one Drupal site, you can simplify the management and can upgrade your sites by using the multi-site feature. Multi-site allows you to share a single Drupal...
Drupal multi site hostingHello and welcome. I'm running several sites using Drupal's multisite feature, and noticed the absence of a group to discuss the various issues and how-tos related to doing this. If anyone has...
Hosting multiple sites drupal cmsDrupal made easy If you've decided that this is the content management system you want to use to create your site, why not also use your own perfect web address with it? Getting your website...
Best robots txt for drupal hostingEvery day, millions of people use Google Image Search to find pictures, products, and people. If you're using Drupal, chances are you're not getting any of this traffic. Drupal's robots.txt...