Multisite Proposal

peakpg edited this page Sep 9, 2013 · 5 revisions
Clone this wiki locally

Allow multisite capabilities

The proposal solution will (probably) use a single CMS/web server connecting to multiple databases. Each site will have it's own database with separate content. Requests will be routed based on (sub)domain to the proper database, with other requests handled by the main site.

The primary intent is to support a main website, with other sub/microsites that can all be served by a single code base. Other Goals:

  • Adding a new site should be relatively quick, but will involve developer effort (add new database/subdomain).
  • Components/code must be shared across sites (i.e. Top 3 articles, etc)
  • Might need to share content.
  • Should probably allow for common pool of users.

Features

This page to details the requirements/concepts for making BrowserCMS multisite.

  • Should assume a single site by default.
  • Configuration (code level) should enable multisite capabilities (i.e. config.bcms.multisite = true)
  • Only subdomains or top level domains will be used to distinguish between sites (i.e. site-a.client.com, site-b.client.com or site-c.com would all be valid)
  • Might need a global configuration store to enable/disable this?
  • Pages, content, templates and modules need to (potentially) separate across sites.
  • Need 'cross site' admin role. I.e. adding users to one site shouldn't necessarily give you permission to add users to another site.
  • Users need to be tied to a specific site.
  • Caching will need to be reexamined. Each subsite will need its own cache, so it may be easier to move to a non-static file caching system.
  • Should probably reexamine how cms vs www subdomains work.
  • Admin logins will need to persist across multiple subdomains.

Decision Point

Main questions to answer is, what is the goal of this module? Is it to make updating a single code base for multiple sites easier? Is its to create distinct sites that can still share content? Drupal's multi-site vs domain access are very different approaches, each with their own benefits.

Single CMS, Multiple DBs

  • [Pro] Easy to implement
  • [Pro] Add new sites via code (i.e. no network like Wordpress)
  • [Con] Scaling will be hard.
  • [Con] No UI for working across multiple sites.

Wordpress

Here are some of the features Wordpress Multisite has:

  • Super Admin - A user with superadmin privileges can manage content/everything across sites.
  • Network Management - There is a new UI to manage networks (i.e. a collection of sites)
  • Plugins/themes can be 'network enabled' meaning they are available within specific networks. Plugins can be enforced for all sites, or enabled for specific sites. Themes are network only.
  • Allows for site creation on the fly using either subdomains/subsections. I.e. new network might be wordpress.com, allowing users to create new sites as ruby.wordpress.com and php.wordpress.com.
  • Uploaded files are placed /wp-content/uploads/sites/
  • Requires extensive and pretty detailed Apache mod rewrite to function.

Drupal

"You can simplify management and upgrading of your sites by using the multi-site feature. Multi-site allows you to share a single Drupal installation (including core code, contributed modules, and themes) among several sites.

each upgrade only needs to be done once. Each site will have its own database and its own configuration settings, so each site will have its own content, settings, enabled modules, and enabled theme. However, the sites are sharing a code base and web document root"

  • Uses a single install with multiple databases.
  • Each site shares code but has own content and configuration data.
  • Content is not shared across sites.
  • No PHP level restrictions for security (i.e. advanced users have complete access to other data/code if they can execute PHP)
  • PHP code handles configuration of available sites (so no shared database)

Drupal Multidomain

https://drupal.org/project/domain

Differs from Multisite because content is in a single database and is shared. Can apparently be complex to visualize which content belongs to which site.

References

Both Wordpress and Drupal have multisite capabilities, though they do things differently. Here are some reference articles on how they work for general concepts and patterns.