Drupal is an open source popular and powerful content management system. The most important features of Drupal is that it allows you host multisites from a single installed Drupal code base i.e it can serve multiple web sites, each with its own individual configuration.
Here, I will show you how to setup multisite from single drupal code base.
First we need to install one Drupal instance as per the instruction in the installation guide from Drupal official site. Here, I will show you how to add another domain to one Drupal installation.
1. First create a new database and database users for the second domain (lets call it as "example1.com")
2. Then grant full privileges to the database to the user created above.
3. Now create a sub-directory in the "/sites" directory call "example1.com", it will look like /sites/example1.com/. Make sure that you don't include 'www' in the sub-directory.
4. Copy the /sites/default/default.settings.php to the new directory /sites/example1.com/settings.php.
5. Now you are ready to setup the add-on domain for "example.com" in your web hosting account. For a shared web hosting environment, example1.com will point to a directory like "/home/username/public_html/example1".
6. Delete directory "/home/username/public_html/example1"
7. Just create a symlink to the main site as "/home/username/public_html/example1".
8. Launch the example1 in browser, Drupal Installer will be launched, follow the installation process according to on-screen instructions. You have successfully setup multisites on same code base.
- Kiran's blog
- 533 reads













Post new comment