Mulitple Sites, Multiple Databases, One Installation of Drupal

Note: These steps were written to Drupal 4.6 but I still use them with D6 when I have trouble with the regular install process. I have a backup db export from an initial D6 setup. When D6 doesn't want to behave, I revert to the D4 process.
Compared to the process of creating multiple sites that share a database, this process is fairly simple.

Databases: Assuming each of your sites will have its own database, you need to create enough drupal databases to match the number of sites you want. Perform the following processes:

1. Login into your database admin area; I use phpMyAdmin. Create as many blank databases that you need (given the number of sites you need). Give them all unique names of course. Mine are idcmi1, idcmi2, idcmi3, etc. Not a naming convention I recommend. It is hard to remember which one goes with what site. I have little reminder postit notes all over my desk ;-)

2. Locate and install the default database that comes with the version of Drupal that you have installed. Look for it in the default installation files that come with Drupal, in a directory called database. The file name is database.mysql.

3. From your database administration area, enter the first blank database and import and expand the database.mysql file. In phpMyAdmin, I click on the SQL tab and on this screen I have the option to browse for a file to upload and expand.

Site directory: Now that you know the database names and assuming you know the domain names of the sites you are creating, do the following:

1. Locate the directory called sites on your server. In there you have a folder called default. Make several copies of this directory and its contents: default, default2, default3, default4, etc.

2. Next, change the name of one default directory to match one of your domain names. For example, my site is so I changed my default directory to be EXACTLY that (including the period and com, no spaces of course). Continue this process until all directories are named exactly the same as their assigned domain. If you are using subdomains like, then use as the directory name.

Site setup: If one of your sites is already up and running, then you know what the following steps are asking you to do. Within the sites/domain directory, there is a file called settings.php. In this file, you set the URL and database access.

1. Edit the settings.php file so that the url referenced in this file is consistant with the domain name you used as the name pf the directory.

2. While in edit mode, update the reference to the database. Change the database reference to match the database that will support the site. For example, is db1 is to hold the content for, then set the database to be db1. On my server, the login and password for the databases are the same as they are all hosted within one occurance of MySQL on my server space. So, this process might be a simple edit for you if your first site is already up and running.

Site configuration: Now it is time to create your login for each site. Because they all have their own fresh clean database, you need to configure each site just like you did the first.

1. From a browser, enter the domain name of your second site (assuming you have already done this for the first). Remember it takes time for DNS servers to refresh so if your server is remote, be patient.

2. Create your login and enter the site.

3. Enter the admin section and start configuring the settings, themes, etc.

Conclusion: At this point, setting up each site is the same as you have done before when setting up a single site.