Create Multi-site for dummies
This information is redundant against the main page for multi-site install instructions at http://drupal.org/getting-started/6/install/multi-site. Removing this page from the flow to avoid confusion over which version to use. Please update the main page (listed above) to include additional information that is required.
Creating multi-sites on Drupal CMS is a simple process. We shall create multi-sites on different databases. We shall create base site [test.net] and add 2 additional sites to it: [news.test.net] subdomain and [news.net] independent domain.
- Create base site [example.com]. Use on-line documentation about installation process.
- Point all your new domains to the same root folder where Drupal is configured (your admin or hosting provider will point domains as needed). If you can to do it yourself:
-
On Windows, change your [c:\WINDOWS\system32\drivers\etc\hosts] file. Add the following lines if you want to create your sites locally:
127.0.0.1 example.com
127.0.0.1 example2.com -
Add the new site to Apache's configuration file [httpd.conf] as you did for your first domain name. Point to the same "root" directory for Drupal's files. For example
/var/www/drupal -
Create a new database for each additional Drupal site you want to deploy. Additional instructions are provided in the Drupal root folder for each supported database. If you are using MySQL you would need to create the database and grant access to it for a specific MySQL user as follows:
create database news;
GRANT ALL ON news.* TO 'dbuser'@'localhost' IDENTIFIED BY 'password'; - Create a sub-folder in the [sites/] directory. If your new site’s name is [example2.com] then create a new directory named [sites/example2.com].
- Copy content of [sites/default/] directory to newly created subfolders.
- Navigate to the new domain name (example2.com). You will be greeted with the install wizard for Drupal.
Thus you may repeat these steps to create as many sites as you want.
Note: If you want modules or themes only for one site, create a new subdirectory within that domain name's directory. For example: [sites/example2.com/modules/] and [sites/example2.com/themes/]. You may now enable these themes and modules for the relevant domain name.
| Attachment | Size |
|---|---|
| HOW-TO Create Multisite on Drupal.tar_.gz | 1.35 KB |
