This post is a part of the Drupal 6 installation description, which you can find here: Installation of Drupal 6.

What is multi-site?

To have a multi-site Drupal installation, all domains has to point to the directory where Drupal is installed, which are called domain aliases. When browsing to a domain alias, the domain name will stay in the address bar. So it will not be a redirection to an another domain name. So for all domains, we are sharing the same Drupal code. This is easier to maintain.

For the database there are 3 different multi-site configurations:

  • Shared database and the same database tables
  • Complete seperated databases for every domain
  • 1 database, but the tables are complete seperated

Shared database and shared database tables, it is the same as a single Drupal installation, written in Installation of Drupal 6. If you have a shared database and shared tables, go to that post.

This post describes how to install Drupal in a multi-site configuration and not using the same database or tables.

When you like to have complete seperated databases, it is clear. Just create a database for every domain.

To have seperated tables in the same database, you have to use a different table prefix for every domain. You can choose your own recognizable table prefix.

Multi-site installation

Use FileZilla to go to your web server directories.

Before we are going to install we first have to do the following:

  • Enter the directory “sites”, you will see the directories all and default
  • Create here with the directory with your domainname: yourdomainname.com (next to the default directory)
  • Copy from the default directory, the default.settings.php file to the yourdomainname.com directory
  • Go to the yourdomainname.com directory and rename the file to settings.php
  • Continue to the next step
  • Enable the write access off the settings.php file (rights=666)
  • Enable the write access off the yourdomainname.com directory (rights=777)

Now we are ready to install Drupal. Start a web browser and enter the address of your website

www.yourdomainname.com/drupal/install.php
  • Choose language: click on English and click on “Select language”, also when you like to have an another site language later on.
  • Fill in database name: drupal
  • Fill in database username: drupal
  • Fill in your database password
  • Click on “Advanced options”,
  • Here you can fill in your own Table prefix: ex2_ (use a table prefix if you sharing the database with other domains, otherwise skip this)
  • Click on “Save and continue”
  • Remove the write permissions from the settings.php file (rights=444)
  • Remove the write permissions from the yourdomainname.com directory (rights=555)

Remark 1: You have to repeat this paragraph including the next paragraph “Configure site”, untill you have all your domain names finished.

Remark 2: You can use every time the same database, if you like to have all domains in the same database.

Configuring the new site

If everything went ok, the database is initialized and you have the screen “Configure Site” in front of you.

  • Fill in all fields, the Username will be the main administrator account.
  • Check if the clean URLs is selected.
  • Click on “Save and continue”