Drupal Multi-Site Setup


Published on

Slides from a presentation I did on Multi-Site Setups in Drupal at the Jamaica Drupal Group on June 20, 2009

Published in: Technology
1 Comment
  • http://landike.blogspot.com/2010/10/multisite-multigroup-system.html

    Here is requirements for certain Multisite.

    Want to choose best way to satisfy these requirements.

    So Can you tell me what is the best? Aegir, Spaces, Usual Domain Access multisite system, OpenAtrium, Organic Group?
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Drupal Multi-Site Setup

  1. 1. Drupal Multi-Site Setup
  2. 2. Yannick Lyn Fatt axle_foley00 on drupal.org Who am I?
  3. 3. Where do I work? The University of the West Indies at Mona, Jamaica
  4. 4. What's a Multi-Site?
  5. 5. <ul>Using one install (or codebase) of Drupal but having more than one site use that same codebase. </ul>
  6. 6. Single Codebase
  7. 7. Multi-Site Structure
  8. 8. What's the alternative?
  9. 9. <ul>Running separate installations of Drupal for each site. </ul>
  10. 10. Separate Installations Site 1 Site 2
  11. 11. Advantages <ul><li>Shared codebase means all sites are using the same version.
  12. 12. 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.
  13. 13. Modules/Themes can be shared across sites or they can have their own modules/themes. </li></ul>
  14. 14. Disadvantages <ul><li>Updating Drupal core means all sites need to be put offline for the update.
  15. 15. 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) </li></ul>
  16. 16. How does Drupal determine which site to load?
  17. 17. 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.test 2. sites/drupal.org.mysite.test 3. sites/org.mysite.test 4. sites/www.drupal.org.mysite 5. sites/drupal.org.mysite 6. sites/org.mysite 7. sites/www.drupal.org 8. sites/drupal.org 9. sites/org 10. sites/default
  18. 18. How to handle the database(s)? <ul><li>Two options </li><ul><li>One database with different prefixed tables.
  19. 19. Separate databases for each site in the Multi-site. </li></ul><li>Which is better? </li><ul><li>It's up to you and the resources available to you. We chose separate databases. </li></ul></ul>
  20. 20. Quick Demo
  21. 21. Helpful Tips <ul><li>Write an Installation Profile(s) </li><ul><li>HOWTO: Write an Installation Profile - http://drupal.org/node/67921
  22. 22. Profile Generator - http://drupal.org/project/profile_generator
  23. 23. Install Profile API - http://drupal.org/project/install_profile_api </li></ul><li>Write some scripts for common tasks </li><ul><li>Drush/Aegir might be able to do some of this already </li></ul></ul>
  24. 24. Helpful Tips <ul><li>Set some conventions and follow them. </li><ul><li>e.g. databases are named by the 'sitename' and users created for each database with the name 'sitename_user'. </li></ul></ul>
  25. 25. Resources <ul><li>Run Multiple Sites from a single code base - http://drupal.org/getting-started/6/install/multi-site
  26. 26. Multi-Site Group - http://groups.drupal.org/multisite
  27. 27. Multi-Site Installation and Setup Links - http://drupal.org/node/43816
  28. 28. How To: Multisites vs. Multiple Sites - http://gotdrupal.com/videos/multisites-vs-multiple-sites </li></ul>
  29. 29. Resources <ul><li>Sharing Users and content across multiple sites - http://drupal.org/node/201673
  30. 30. Drush - http://drupal.org/project/drush
  31. 31. Aegir - http://groups.drupal.org/aegir-hosting-system </li></ul>
  32. 32. Questions?
  33. 33. Thanks for listening! Have a nice Day! :)