Other Applications
How to create multiple sites in my Drupal application?

How to create multiple sites in my Drupal application?

Drupal gives you the option to have several different sites under one Drupal installation using different databases (or database prefixes) for each site.

Let’s say that you have two domains – domain1.com and domain2.com; domain1.com is your main domain and domain2.com is a secondary domain. To create two different Drupal sites for domain1.com and domain2.com, follow the steps below:

  • Install Drupal at domain1.com.
  • Create a new MySQL database and user. They will be used for the new site domain2.com.
  • Create a directory sites/domain2.com/ inside your main Drupal folder (public_html most probably).
  • Copy sites/default/default.settings.php to sites/domain2.com/
  • Rename sites/domain2.com/default.settings.php to sites/domain2/settings.php
  • Park domain2.com to domain1.com
  • Go to http://domain2.com/install.php and complete new installation for domain2.com with the MySQL details that you’ve already created.

That’s it! If you want, you can create more Drupal multiple sites following the steps above.

Share This Article