Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Implement multisites in drupal 8?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 545
    Comment on it

    Drupal gives the amazing feature to use multisite with share code base, Multisite provides the facility to use single Drupal installation setup (including core code, contributed modules, custom modules, and themes) among several sites in which allows separate, independent sites to use single codebase. Each site has its own database, configuration settings, contents.

    Now, We're going to set up one core installation, and share single codebase to those three subsites which we are using. Each subsite will share those files but its own database. In this blog, I'm going to set up three subsites with different URLs: like given below

    http://domain.com/site1

    http://domain.com/site2

    http://domain.com/site3

     

    1: Edit sites/sites.php file and add sites:

    $sites = array( 
    'domain_name.site1' => 'site1', 
    'domain_name.site2' => 'site2', 
    'domain_name.site3' => 'site3' 
                  );

     

    2: Create directory site1, site2, site3 under /sites folder.

        /var/www/html/d8multisite/sites/site1

        /var/www/html/d8multisite/sites/site2

       /var/www/html/d8multisite/sites/site3

     

    3: Copy settings.php file from default folder and paste it in site1, site2, site3 as well.

       /var/www/html/d8multisite/sites/site1/settings.php

       /var/www/html/d8multisite/sites/site2/settings.php

       /var/www/html/d8multisite/sites/site3/settings.php

     

    4: Create symlinks. Go to the root directory i.e /var/www/html/

      nirdesh@nirdesh:/var/www/html$ ln -s d8multisite site1

      nirdesh@nirdesh:/var/www/html$ ln -s d8multisite site2

      nirdesh@nirdesh:/var/www/html$ ln -s d8multisite site3

    now you can see new three folders site1, site2, site3, with some sub folders created in root directory with arrow signs (signs that could be different depending on O/S)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: