Skip to content

Instantly share code, notes, and snippets.

@dasbairagya
Last active July 24, 2021 10:03
Show Gist options
  • Save dasbairagya/38396fd1365cd1bcb1e7aa7f4e911797 to your computer and use it in GitHub Desktop.
Save dasbairagya/38396fd1365cd1bcb1e7aa7f4e911797 to your computer and use it in GitHub Desktop.
🎗️ Drupal Multisite Setup🎗️

Drupal Multisite Setup

Hi we are creating drupal 8 multisite in our local machine.

👉️Initial steps to follow..

📌️Under /sites replicate the example.site.php and rename to sites.php

📌️Create an array in php named $sites.

<?php  $sites=array('webshop.local.site1' =>'site1', 'webshop.local.site2'=>'site2' ); ?>

📌️Now create the directories[site1 & site2] under /sites with the same name as in array values.

📌️Now we have to create settings and services file in both the directories.To do that replicate default.services.yml and default.settings.php from the /default to both the directories and rename them to remove 'default.' from respective names.

📌️Create the virtual host for those two subdomain [webshop.local.site1] & webshop.local.site2] with the same as array keys.

📌️Create two separate databases[e.g. webshop_site1 & webshop_site2].

📌️Now visit two url http://webshop.local.site1 & https://webshop.local.site2

👉️Note: how to create virtual host:- link

Clone webshop from here:- https://github.com/dasbairagya/webshop.git

After cloning run composer install command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment