drupal multisite setup with sub directories on single domain

I am testing out different installation profiles for Drupal 5.0 and wanted to create multiple “sites” on the same domain. Each site shares the same code base, but they are differentiated by sub-directories.

To set this up, creating a new sites folder is not enough. You also need to create a symbolic link in the physical directory structure (or perhaps add a mod_rewrite rule).

For example, if your main drupal site is setup at example.com, and you want to create a new site at example.com/new:

First, create the new sites folder and settings.php:
./sites/example.com.new/settings.php

Then create a symbolic link at the root folder of your drupal installation:

ln -s . new

so that new -> DRUPAL ROOT

This last step wasn’t not documented clearly in the Drupal Handbooks.

Now example.com loads main drupal site, but example.com/new loads the drupal installation page, prompting me for that site’s specific settings.

Since I plan to develop a handful of installation profiles, it will be really useful to dedicate each site to a specific profile.

Thus, I’ll end up with a handful of drupal sites:
example.com
example.com/profile1
example.com/profile2

and so on…

2 Responses to “drupal multisite setup with sub directories on single domain”


  1. 1 cf

    Hi, I have tried everything, code is really difficult for me to understand. but think i have made it thru the first several stesps (creating subdomain xxx/tncblogs.info and even though may have $ code wrong in settings.php with files folder etc in new xxx/subdomain, it is set up.
    Okay, but per your instruct (the crux of your handbook clarification, sad to say I am stilll at a loss):
    Then create a symbolic link at the root folder of your drupal installation:

    ln -s . new

    so that new -> DRUPAL ROOT

    //////////
    Okay, but I see no “root” folder, and how can I literally (do I literally) input ln -s . new (or is it to replace the word ‘new’ with the words “drupal root”?). I am so lost but cannot deal with wordpress any longer. can you help? i thought the input for new would be in a file not a folder? okay, maybe it is not worth it and I should just use up another database sql since the size of drupal one install is too small by itself to use any modules other than core. okay, thanks. cf

  2. 2 Brett

    Thanks. I just used this with a Drupal 6.3 install. Appears to work as advertised.

Leave a Reply