Sorry, you need to enable JavaScript to visit this website.
logo

Drupal Multisite: Less Work, More Output

By Aliaksei Lyzo

Maintaining an online presence often forces companies to build multiple websites, with a site for each brand, product, or country. Keeping up with dozens or even hundreds of websites can quickly turn into an expensive, time-consuming effort.

Luckily, Drupal is here to help. Multisite functionality is built into Drupal.

A Drupal multisite provides you the opportunity to create multiple websites using the same codebase. With that said, all sites would be different from one another, serving different audiences. The cost of managing a multisite platform is substantially lower than that of managing hundreds of separate websites.

At Drupal, we have several ways to accomplish multisite functionality. The following case study will describe some architectures that make this possible. Read on to identify which option is best tailored to your needs.

 

1. Classic Drupal Multisite Architecture

multi site arch
physical layer

Websites share code (the Drupal core, modules, and themes), but each website has its own database so they do not share content, configuration, or settings. Each website can also contain some extra modules/themes under its own subdirectory in the same codebase. A multisite is accomplished by creating different folders for the various websites in the /sites/ folder of the Drupal system.

For example:

/sites/Site 1/

/sites/Site 2/

/sites/Site n/

We can control which website will use which modules and themes by placing them in the correct folders, accessible only for specific sites.

 

Advantages

  • Autonomous content and users Drupal core code and library updates only need to be done once
  • Some degree of customization is possible, because each site can have its own custom theme and modules
  • New contrib or custom modules can be shared across the sites, and then individual sites can enable them and import the configuration from them
  • Config Split module may be used to segment what configuration is shared across sites and what should be overridden on each site 

 

Disadvantages

  • All developers working on the team have access to the codebase that affects all sites.
  • Updates of configuration and contrib modules, which are not shared across the sites, still need to be run once per site.
  • Complex options for content sharing
  • Single point of failure:
  1. Since there is a single server hosting all sites, failure of server or traffic spike on one of the sites can affect all sites.
  2. A bug in one site can affect all sites

 

Typical scenarios

Classic Drupal Multisite would be most beneficial if all sites have the same features and are using similar modules and settings, but have different content and users.

 

Business case

A company maintains many brands, and each brand requires a website. Websites must be visually different (each brand has its own guidelines), but functional requirements are mostly the same (banners, videos, sliders, contact forms, etc.). The same development team develops and maintains all sites, but each site may have its own marketing or content team that manages content for the site.

 

2. Multi-Domain Architecture

logical layer (domain access)
multi-domain architecture

This architecture consists of a single codebase and single database/installation. The Domain Access suite of modules provides functionality that allows multiple sites (domains) to be served from this setup. It also allows you to categorize your content as shared or unique. If you like, you can choose a specific piece of content for one particular domain, then share it across all sites.

 

Advantages

  • Less effort spent on development
  • Maintain and update a single Drupal installation
  • Admin users can effortlessly manage all content from one platform
  • Content and users can be shared across multiple sites
  • Identical features and functionality across all sites

 

Disadvantages

  • Single point of failure
  • If a site needs to be “taken away” into its own hosting plan, this is not a not straightforward process
  • Requires strict governance, enforcing a policy of no exceptions (an exception is a functionality on a site that doesn’t follow the rest)

 

Typical scenarios

Multi-Domain setup makes sense if sites will share content and/or users, and if all of the sites will have the same functionality and content types/data structures, but might have some slight visual differences.

 

Business case

It will exist as an e-commerce site with one product catalog, a single checkout, and common users, but separate domains for different product categories.

 

 

3. Multi-Locale Architecture

logical layer (domain locale)

Multi-Locale allows for the use of language-based regional targeting, utilizing the power of multilingual capabilities for multiregional targeting. This is recommended for sites targeting multiple regions.

Using the Drupal multilingual system, you can translate any piece of content to different languages. The admin interface has built-in translations for 94 languages.
The domain name may be used to determine the language. Specifying "example.com" as the language domain for English and "example.de" as the language domain for German will result in content being shown only in the respective language for each domain.

 

Advantages

  • Minimal effort spent on development
  • Maintain and update a single Drupal installation

 

Disadvantages

  • Single point of failure
  • Same look and functionality for all sites.

 

Typical scenarios

Multi-Locale Architecture would be useful if you want to show content to your site visitors in their native language. Multilingual sites can dynamically show translated content to their visitors based on customizable factors like browser language.

 

Business case

Corporate website for small and medium-sized businesses with clients from different countries.

 

4. Distribution Profile Architecture

Drupal distribution provides everything you need to start your web projects, from the required modules and libraries to custom modules and themes, and from the configuration to the default content. It’s a website starter pack. 

Drupal distribution focuses on a particular business and adds features specific to it into one installation, so it takes less time to configure the most common elements of a Drupal website.
 
For example, if you’re looking to build Drupal websites for hospital management, your Drupal developers can pre-configure modules for patient registrations, investigations, pharmacy management, etc., and also configure roles for admins, doctors, patients, and nurses. Now, when you want to deploy the same Drupal solution (or one similar to it) for a different hospital, much of the work is already done.

drupal distribution code base

Advantages

  • Sites are independent from each other: code errors or traffic spikes on one site don’t affect other sites
  • Flexibility: sites can be customized more easily (as long as they don’t override configuration provided by the base distribution and can still receive functionality updates)

 

Disadvantages

  • This architecture involves maintaining the distribution codebase as well as maintaining each of the sites
  • Maintaining a distribution is also hard work

 

Typical scenarios

A distribution profile works well if the sites are all starting out the same but are expected to grow in different directions. Maintenance work is expected to be independent for each of the sites.

 

Business case

A multinational corporation maintains many brands or services, and each brand (service) requires a website in a separate country or region. Websites are visually different (each brand has its guidelines) and the languages vary across countries, but functional requirements are mostly the same (banners, videos, sliders, news, articles, contact forms, user registration and personal account, etc.). Each country has its own development and marketing or content team, which manages codebase and content for that country’s site.

Get a free consultation

Related Items

CLS Score
How to Improve CLS Scores in PageSpeed for Drupal Sites Using the EU Cookie Compliance Module for Cookie Warnings

Solving the Layout Shift Issue by Cookie Consent Pop-Ups

3 min read
Drupal
By Dzmitry Hryn
Drupal security preview
Enhancing Drupal Website Security with Recommended Security Modules

Website security is not a set-it-and-forget-it task, but an ongoing process that needs constant attention. After all, it’s better to prevent a…

5 min read
Drupal
By Aliaksandr Kostsikau
Let's ask google
Is Drupal SEO friendly? Let's ask Google

Is Drupal SEO friendly? Good question. To get to the bottom of this, let's analyze the Google recommendations for website SEO optimization…

5 min read
Drupal
By Aliaksei Lyzo
less work more output
Storybook and Drupal

Storybook is an open source tool for building UI components and pages in isolation. It streamlines UI development, testing, and documentation.

7 min read
Drupal
By Volha Tsiamliak, Yaroslav Lushnikov
Attico International's New Brand Identity
Attico Enters a New Era of Growth and Sustainability with Rebranding Efforts

Attico has been a leading provider of innovative and top-notch digital solutions to customers worldwide for years. As we continue to grow and…

2 min read
Drupal, Marketing, QA
By Editor