HOW-TO: create a multisite in Drupal using subdirs and without a domain name

26 Feb

Recently I had to create a multi-site Drupal system for a project (that means different organizations will be able to use the same Drupal system but with completely independent database, themes, modules, etc.) . Even though there are lots of documentation on this spread over the Internet it did not turn out to be very easy for my case.

Description of my case:

– An Ubuntu GNU/Linux server
– Drupal version 6 installed by aptitude install drupal6
No domain names. I reach the remote server by its IP address e.g.

So the default set up is OK, I can visit and see the content but I wanted to create another independent Drupal site using the same source codebase., e.g.

The most critical part turned out to be not the instructions in the Internet documentation but in the /usr/share/drupal6/sites/default/settings.php file:

 * For example, for a fictitious site installed at
 *, the 'settings.php'
 * is searched in the following directories:
 *  1. sites/
 *  2. sites/
 *  3. sites/org.mysite.test
 *  4. sites/
 *  5. sites/
 *  6. sites/org.mysite
 *  7. sites/
 *  8. sites/
 *  9. sites/org
 * 10. sites/default

According to this explanations if I want to have another Drupal site such as then I should create a directory like that



and this seems to be the most critical part that caused me trouble until I realized the solution. Except this I just copied the settings.php from the existing /usr/share/drupal6/sites/default/ directory to the directory I created above, did the dbconfig.php customization, created another database in MySQL server and did not forget to create a symbolic link by issuing the command

sudo ln -s . iris

at /usr/share/drupal6

Finally I pointed my browser to and everything worked as expected.

Some more URLS:

Create Multi-site for dummies

Grant write permissions on the configuration file

Run multiple sites from the same code base (multi-site)

Leave a comment

Posted by on February 26, 2010 in sysadmin



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: