Drupal Multisite Install

These instructions are for people that want to run multiple Drupal sites but want to run them off of only one codebase. This allows for much easier module, theme and core upgrades.

Preparation

 * 1) Go to the DreamHost Control Panel and a single domain to use Drupal on.
 * 2) Create this domain as fully hosted.
 * 3) Create 2 or more domains as "Mirrored" Domains sub1.domain.com and sub2.domain.com pointing to domain.com as the site to be mirrored
 * 4) *For the purpose of these instructions we are going to use domain.com, sub1.domain.com and sub2.domain.com. You can make as many sub.domain.coms as you would like or even use separate domains entirely on the same Drupal installation.
 * 5) Create 3 MySQL databases. We'll call them domaindb, sub1db and sub2db.

Installation

 * 1) open a terminal or putty or whatever you use to ssh to DreamHost.
 * 2) *You should be in your user directory. Type pwd and you should see /home/username where username is your personal username.
 * 3) type wget http://ftp.drupal.org/files/projects/drupal-7.19.tar.gz  in the terminal. You should download a file called drupal-7.19.tar.gz.
 * 4) type cd domain.com && tar --strip-components=1 -xzf ../drupal-7.19.tar.gz . A list of files should be unpacked into a directory called domain.com which was created by the hosting script.
 * 5) Now you can remove drupal-7.19.tar.gz by typing rm ~/drupal-7.19.tar.gz.
 * 6) Copy the default settings.php by typing cp sites/default/default.settings.php sites/sub1.domain.com/settings.php.
 * 7) Create settings.php for sub2 by typing cp sites/default/default.settings.php sites/sub2.domain.com/settings.php
 * 8) *While you are here you can also take this time to create directories for your modules and themes. To add modules and themes to ALL your Drupal installs, create a modules directory and a themes directory in the sites/all directory. If you want to add modules and themes to only one domain or another, create a modules directory and a themes directory in the sub1.domain.com or the sub2.domain.com directories.
 * 9) **To create the directories type mkdir sites/all/modules and mkdir sites/all/themes. If you want to make a themes and modules directory for your subdomains, replace all with the other directory names.
 * 10) You can now quit out of the terminal
 * 11) Open your web browser of choice and navigate to domain.com.
 * 12) You should see a install/database configuration screen. [[Image:Drupal install.jpg|right|thumb|300px|Drupal Install]]
 * 13) You're probably using MySQL. Leave it at that.
 * 14) For database name fill in whatever name you chose. For this set of instructions we went with domaindb (for the main domain install).
 * 15) For username and password fill those in. (If you don't know this you're in trouble.)
 * 16) Click on Advanced Options
 * 17) For Database Host it will probably be mysql.domain.com where you replace domain.com with whatever is your registered domain.
 * 18) Leave Database Port and Table prefix alone. Unless you are running a multisite off of a single database you don't need to mess with these.
 * 19) Click Save Configuration.
 * 20) You should now see a Installation Complete page. You might want to continue to your new site and create your first user. [[Image:Installation Complete.jpg|right|thumb|300px|Drupal Install]]
 * 21) Now point your browser towards your sub1.domain.com and sub2.domain.com and you'll have to walk through the installation pages for both sites. Fill them out and when you are done you will have a working Drupal multisite installation.
 * 22) Voilà!