drupal multi-site setup

Download Drupal Multi-Site Setup

If you can't read please download the document

Upload: ylynfatt

Post on 16-Apr-2017

25.424 views

Category:

Technology


0 download

TRANSCRIPT

Drupal Multi-Site Setup

Yannick Lyn Fattaxle_foley00 on drupal.org

Who am I?

Where do I work?

The University of the West Indies at Mona, Jamaica

What's a Multi-Site?

Using one install (or codebase) of Drupal but having more than one site use that same codebase.

Single Codebase

Multi-Site Structure

What's the alternative?

Running separate installations of Drupal for each site.

Separate Installations

Site 1

Site 2

Advantages

Shared codebase means all sites are using the same version.

One big upgrade of drupal core can be done as opposed to updating the core code for separate installations each of which could be a different version of Drupal.

Modules/Themes can be shared across sites or they can have their own modules/themes.

Disadvantages

Updating Drupal core means all sites need to be put offline for the update.

Updating core and contrib modules, means running update.php for each site in your Multi-Site setup. (though you might be able to use Aegir/Drush to run update.php for all sites in one go)

How does Drupal determine which site to load?

For example, for a fictitious site installed at http://www.drupal.org/mysite/test/, the 'settings.php' is searched in the following directories:

1. sites/www.drupal.org.mysite.test2. sites/drupal.org.mysite.test3. sites/org.mysite.test4. sites/www.drupal.org.mysite5. sites/drupal.org.mysite6. sites/org.mysite7. sites/www.drupal.org8. sites/drupal.org9. sites/org10. sites/default

How to handle the database(s)?

Two optionsOne database with different prefixed tables.

Separate databases for each site in the Multi-site.

Which is better?It's up to you and the resources available to you. We chose separate databases.

Quick Demo

Helpful Tips

Write an Installation Profile(s)HOWTO: Write an Installation Profile - http://drupal.org/node/67921

Profile Generator - http://drupal.org/project/profile_generator

Install Profile API - http://drupal.org/project/install_profile_api

Write some scripts for common tasksDrush/Aegir might be able to do some of this already

Helpful Tips

Set some conventions and follow them.e.g. databases are named by the 'sitename' and users created for each database with the name 'sitename_user'.

Resources

Run Multiple Sites from a single code base - http://drupal.org/getting-started/6/install/multi-site

Multi-Site Group - http://groups.drupal.org/multisite

Multi-Site Installation and Setup Links - http://drupal.org/node/43816

How To: Multisites vs. Multiple Sites - http://gotdrupal.com/videos/multisites-vs-multiple-sites

Resources

Sharing Users and content across multiple sites - http://drupal.org/node/201673

Drush - http://drupal.org/project/drush

Aegir - http://groups.drupal.org/aegir-hosting-system

Questions?

Thanks for listening! Have a nice Day! :)

Click to edit the title text format

Click to edit the title text format

Click to edit the title

Click to edit the title