Create Multisite using single codebase and single Database
Building a Drupal Multi-site:
Introduction: site Builders do build multiple site using the same codebase. They do so by creating a folder in the sites directory that is pointed at the host name. This is easily done in a product server but complicated in a local host machine
1. Create a folder for each siteswith domain name e.g daretod8.com
2. Create a file for settings.php in each folder
(see the default.setting.php for more details)
In Drupal 7, rename example.sites.php to sites.php
3. According to Drupal your site folder is supposed to look like this
Sites
all
default
daretod8.com.sites.php
daretod81.com
modules
settings.php
daretod81.com
modules
settings.php
4. uncomment and change the $Sites array as needed.
Replace the line in sites.php with your domain names;
$Site['daretod81.com']='daretod81.com';
$Sites['daretod81.com']='daretod81.com';
do the same for the second site
These sites are built in a single database using define table prefixes and choosing what database recourses to share between the sites
Introduction: site Builders do build multiple site using the same codebase. They do so by creating a folder in the sites directory that is pointed at the host name. This is easily done in a product server but complicated in a local host machine
1. Create a folder for each siteswith domain name e.g daretod8.com
2. Create a file for settings.php in each folder
(see the default.setting.php for more details)
In Drupal 7, rename example.sites.php to sites.php
3. According to Drupal your site folder is supposed to look like this
Sites
all
default
daretod8.com.sites.php
daretod81.com
modules
settings.php
daretod81.com
modules
settings.php
4. uncomment and change the $Sites array as needed.
Replace the line in sites.php with your domain names;
$Site['daretod81.com']='daretod81.com';
$Sites['daretod81.com']='daretod81.com';
do the same for the second site
These sites are built in a single database using define table prefixes and choosing what database recourses to share between the sites
Comments
Post a Comment