Last updated May 14, 2016. Created on August 20, 2009.
Edited by hansfn, opdavies, jhr, chicagomom. Log in to edit this page.


This guide assumes you have the following installed and running:

  • Microsoft's Internet Information Services web server 6 or 7
  • PhP 5.2 or higher with PDO dlls enabled.
  • The IIS FastCGI Module (IIS6 version here - in IIS7 it's an integrated module that needs to be enabled).
  • MySQL
  • If you want clean urls, you'll also need the URL Rewrite module (IIS7) or a third-party url-rewrite module set up at some point, though you can do this afterward.


  1. Install a site. This will be the parent site, providing the code-base for all the child sites.

    IIS7: be sure your parent site has a web.config file (see this for more info). Child sites will use the settings in the parent site's web.config file. To override these settings, put a web.config file with just the settings you want to override in the child site's folder (eg sites/

  2. Create child site folders. Decide how you want people to navigate to your sub-site. In the parent site's /sites/ folder, create sub-folders for each new site you wish to install.
  • Example 1: - in parent /sites/ folder, create /sites/
  • Example 2: - in parent /sites/ folder, create /sites/
  • Example 3: - in parent /sites/ folder, create /sites/
  • Copy the files & private subfolders. Go into the parent site's sites/default folder, and copy the /files and /private folders. Navigate to each new child site's folder (eg sites/ and paste them.
  • Create child site settings.php file(s). Into each child site folder copy the parent's /sites/default/settings.php. Make each settings.php writable to IIS_WPG (IIS6) or IIS_IUSRS(IIS7).
  • Create IIS Site Mapping or Virtual Directory, depending on how you set up your site structure.
  • IIS7 - Start the IIS Manager.

    • Example 1: - Right-click on | Add virtual directory. Alias: [new site name, eg subsite]. Physical path: [parent site's physical path]. Click OK.
    • Example 2: - Right-click on Sites | Add web site. Site name: [new site name, eg site2]. Click to select the application pool, and select the parent site. Physical path: enter the parent site's physical path. Host name: [new site url, eg site2.localhost]. Click OK.
    • Example 3: - add a web site as example 2, calling the host name
  • Set up the database(s).

    Multiple databases - If you want each site to have it's own database, create them now.

    For each child site, change settings.php to include each site's database name, username, and password:

    $databases['default']['default'] = array(
      'driver' => 'mysql',
      'database' => 'databasename',
      'username' => 'username',
      'password' => 'password',
      'host' => 'localhost',

    Single database - See this tutorial.

  • Run the setup script for each site, eg http://site2.localhost/install.php.
  • Looking for support? Visit the forums, or join #drupal-support in IRC.


    dAv3’s picture

    Has anyone got this working?

    I have been trying for the last week to get multisite set up with
    - Drupal7,
    - IIS 7.5,
    - SQLSRV,
    - on WinServer 2008 r2.

    Step 1 says - Install a site. This will be the parent site, providing the code-base for all the child sites.

    Does this mean install a site at the base directory as in drupal7/ and then the two you actually want under drupal7/sites/...
    so you'll have three or just move the dupal files to your base - drupal7/ and then proceed with installing the 2 site you want under base-dir/sites/... ?

    I'm trying to set two sites( & to use the same codebase, with seperate databases. I've set up the following directories, with the appropriate contents and permissions in each (/files, /themes, /modules, settings.php).

    how can i actually browse to these two subsites and begin the install? I think my IIS mapping may be off because i try to navigate to http://localhost/ and all i get is a 404 error?

    I can get a single site up without any problems so i know all the components are working.

    Can anyone help with this, its causing pre-mature baldness??

    chicagomom’s picture

    Assuming is your first site, and is in the web root, the directory for that site would be drpal7/sites/default, and you would navigate to it by http://localhost. The second would be drupal7/sites/, into which you would put web.config and settings.php files. Use the default web.config that comes with d7. Put your site2's database info in this settings.php file.

    For localhost to recognize the second site via URL appropriately you would need to edit the HOSTS file thusly:

    On an external webserver this would be handled by DNS pointing the appropriate domain names at that server's IP. Since you're doing localhost you have to fake it by editing your HOSTS file.

    Then if you navigate to, the local web server should recognize it and begin the setup process for you.

    Hope that's helpful.

    dAv3’s picture

    I changed my directory structure so that my drupal install is located directly under the web root:
    - [web root]/drupal-files
    instead of:
    - [web root]/drupal7/drupal-files

    Now i have:
    [web root]/sites/
    [web root]/sites/

    - In each i put a web.config file and different settings.php files,
    - I edited my hosts file - &,
    - Cleared my dns cache (probably not necessary)
    - and browsed to each and

    And it's done, two sites up and running, without needing to set up a default site and without having to play around with iis bindings.

    BUT the thing is I don't want drupal files all over my [web root], I'd prefer to put them somewhere else or install in a subdirectory like:
    [web root]/drupal7/drupal-files, thats where I was running in to trouble.

    How can i set it up so that my drupal install will be hosted in a sub-directory of the web root?
    Something like:

    [web root]/drupal7/drupal-files

    [web root]/drupal7/sites/
    [web root]/drupal7/sites/

    Thanks for your help

    dAv3’s picture

    Okay, so i finally got it working.

    To have a multi-site drupal installation in a subdirectory of the web root, in IIS I needed to bind the websites to the directory which drupal is installed eg [web root]/drupal7

    I have installed two websites side by side, under the one drupal codebase without having to setup a default site(any drawbacks to this?), which was the goal of my installation(to have two equal sites).

    So to recap I:

    - setup websites under [drupal dir]/sites/
    - make sure they have a standard web.config, and a settings.php file that is specific to each site (also /files, /themes and /modules folders for future use).
    - enter the sites in my hosts file to point to
    - create a website in IIS for each site, with the physical path pointing to the location of your drupal install
    - run the script for each site, eg
    - and it's running swimmingly

    I don't know where i went wrong, it's all in the original guide i just didn't see it!

    Thanks chicagomom for your efforts, deffinately put me on the right path and got it working for me.

    Cheers. :)

    dzigner’s picture

    This is what I am trying to do, and cannot find how to do this. Maybe you can help me.
    My webhost has this configuration:

    1. windows server 2003
    2. iis7
    3. php 5.2.5
    4. MySQL 5.0.9

    My domain is I have installed drupal under a subfolder in document root and directed a subdomain to this install. So my files are under /dessites folder and the url I use is Now I want to create a subsite under sites/, which should use the same codebase, but a different database. So my domain( should access the codebase at the subdomain I have configured the databases for both the sites.
    I cannot use .htaccess on my server, and I have no putty access to it, nor do I have access to the IIS manager. I cannot edit the host file. I have ftp access.
    How can I achieve this setup? Please let me know.

    p.s: OK, so now I have got the site running, but I cannot access anymore. These are the steps I took:
    1. install drupal codebase on with mysql db.
    2. create a folder under /sites/. Setup a different mysql db.
    3. point the site to /dessites as physical path.
    4. give hostname, the same IP address.

    Then I check, and it accessed the database of, and not the database I originally setup for the codebase. I could start the install at, and it accessed its own database. After the install, at, I get the same site as at Also, I have no admin tabbar even though I am signed in as an admin.
    Please help me.

    I have decided to just let this go, as I am not getting any help anywhere.

    shantidev’s picture


    Thanks for the tutorial on drupal 7 multisite on IIS. I have installed drupal 7 on Windows 7 and using IIS as the webserver.

    I followed the instructions to install multisite. I am able to access the site successfully using localhost, i.e http://localhost:port/subsite

    However, when I am using the IP address (LAN IP address or my public IP address) http://[LAN IP/PUBLIC IP]:port/subsite, I am getting the default site instead of the multisite.

    This is confusing me. Please advise if I need to set specific entries in my sites.php to get it right.

    I want to be able to access my multisites from other machines on my LAN as well as remotely. I have taken care of the port forwarding in my router.