Skip to main content
Home
Blog

Main navigation

  • Home
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Knowledge Base
  4. How-To

How to use Drupal multiple sites feature?

By ongetc , 26 February, 2017

To keep thing as simple as possible I will make the follow assumption:
. Your main Drupal site already is installed at http://maindrupal.yoursite.com
. Your additional Drupal site is installed at http://drupalsub.yoursite.com

Notes:
. You can get a more advanced variation of how to install Drupal multiple sites but I will try to keep thing simple here!
. These steps will put this Drupal installation into your Drupal database that your create for this site

With the above assumption, this article is showing you how to install additional Drupal site that shares the same Drupal installed code but with its own content, template, module, etc.

Here are the steps to install additional sites.

1. Create a database and write down the database's name.

2. Create a database user and write down the user's name and password.

3. Add the database user to your database, and give the user all permissions.

4. Create a drupalsub.yoursite.com subdomain using your Cpanel

5. Make your additional sites point at the Drupal installation directory.
Note: this step is little tricky so I will try to show some detail here
* "maindrupal" is the folder of your main site
* "drupalsub" is the folder of your additional Drupal site.

a. Rename your subdomain folder to something else.
For example mv drupalsub drupalsub.old

b. Create a symlink for you additional Drupal site.
For example: ln -s ~/www/maindrupal ~/www/drupalsub

6. Go to your "maindrupal/sites" folder and copy the default directory, and name the new directory to match your subdomain site name.
For example drupalsub.yoursite.com

Note: when you are done with this step you will see three folders in "maindrupal/sites":
default, all, "drupalsub.yoursite.com"

7. Edit the "drupalsub.yoursite.com/settings.php" file and change the name of the database to the name of the one you just created above

8. You can now install your additional Drupal site using your web browser to http://drupalsub.yoursite.com/install.php and follow through the Drupal install screen.

That's it!

Forums
How-To

Reseller hosting (free)

Hosting24 (w/ ssh)

A2 Hosting

Monthly archive

  • February 2019 (1)
  • December 2020 (224)
  • January 2021 (168)
  • March 2021 (1)

Pagination

  • Previous page
  • 2

Popular content

Last viewed:

  • Wiki Type FrameWork
  • The Regex Coach
  • Contenido
  • Simple Machines Forum
  • Apache OFBiz®
  • DotNetNuke
  • NPDS
  • Exponent
  • How to install PHP on Windows 2008
  • How to use Drupal multiple sites feature?

User login

  • Reset your password