We use cookies to make your viewing experience better. By accepting you consent, you agree to our Cookie policy

Accept
Improve your Craft CMS skills

Managing Multiple Sites With Craft CMS Multisite

10 min read
Managing Multiple Sites With Craft CMS Multisite

Running multiple websites can quickly become chaotic. Craft CMS's powerful multisite capabilities simplify managing extensive networks of sites, enabling centralized control and efficient workflows. This guide provides invaluable insights on optimizing development, performance, SEO, and content workflows when managing large volumes of complex, interconnected sites with Craft's robust multisite tools. Read on to streamline your multisite operations.

Craft CMS's powerful multisite capabilities simplify managing large networks of sites through centralized control, reusable templates and assets, shared user permissions, and simplified maintenance. It enables efficiently administering many complex, interconnected sites from one unified dashboard. Multisite streamlines workflows when operating at scale.

Craft CMS Multisite

Overview of Craft CMS Multisite

Craft CMS Multisite allows managing multiple websites and domains powered by a single Craft CMS installation. Rather than setting up separate Craft installs for each site, Multisite enables central administration of multiple sites from one control panel.

This brings tremendous benefits for organizations managing a collection of related sites and brands. Common use cases include localized sites for different regions/languages, microsites for specific campaigns or products, and divisional sites for various business units. Multisite makes managing all these sites far more efficient compared to individual Craft installs.

With Multisite, sites can share common data structures, templates, and plugins while still having independent content, users, and configurations. It provides the flexibility to scale up the number of sites without added overhead. Updates only need to happen in one place, and changes can be propagated across all sites.

Overall, Multisite brings simplified administration and maintenance for anyone juggling multiple Craft-powered websites. It's built for organizations whose digital presence extends beyond a single domain.

Benefits of a Multisite Setup

Craft CMS Multisite offers many advantages over setting up individual Craft installs to run multiple sites:

  • Centralized Control Panel: Manage all sites from one admin with a unified dashboard, user management, and centralized plugin/template management. Dramatically simplifies administration.

  • Easier Maintenance: Updates, backups, debugging and security patches can be handled in one place. Don't have to touch each site individually.

  • Reusable Configurations: Share field layouts, sections, entry types, etc across sites. Allows propagating changes to multiple sites easily.

  • Shared Templates and Functionality: Sites can leverage common templates, plugins, controllers while still having separate content and frontend theming.

  • Reduced Overhead: No need to run separate servers/dbs for every site. Host and scale numerous sites for less overhead.

Overall the consolidated management and maintenance advantages allow organizations to scale sites while reducing complexity. It's far more efficient than individual Craft installs when managing 5+ related sites.

When to Use Craft CMS Multisite

Craft CMS Multisite offers the most benefit for organizations with many related sites and brands under one umbrella. Some good use cases:

  • Managing large volumes of sites (10+): The centralized admin and propagation of changes across sites provides huge time savings.

  • Multiple locales/languages: Easily manage regionalized/translated versions of a site powered by shared templates and backend.

  • Microsites for campaigns/products: Spin up temporary sites for specific initiatives using core infrastructure.

  • Multiple brands/business units: Give each brand its own site with shared core functionality and some customization.

  • Testing/staging environments: Create copies of live sites for testing and QA work more easily.


In contrast, Multisite may be overkill for a few unrelated websites. Individual Craft installs can work better when sites have very custom requirements and little overlap. Evaluate whether the benefits of consolidation outweigh custom complexity.

Overall Craft CMS Multisite solves major management challenges for organizations with large collections of interconnected sites and brands. For simpler use cases with just a handful of installs, individual Craft setups may still be preferable.

Technical Prerequisites for Multisite

Server and Hosting Requirements

When setting up a Craft CMS multisite environment, the server and hosting Craft CMS requirements should be carefully evaluated. At a minimum, Craft CMS 3.5+ calls for PHP 7.0.5 or newer, along with MySQL 5.5+ or MariaDB 5.5+. However, for best performance and scalability, the latest PHP 7 and MySQL 8+ or MariaDB 10.1+ releases are highly recommended. The server itself also needs to be running a capable web server like Apache or Nginx that is properly configured to serve the Craft CMS sites.

In terms of resources, sufficient disk space should be provisioned across both files and the database to account for all the collective content, assets, revisions and other data of the sites. Multisite environments tend to accumulate significantly more content than individual installs.

Dedicated hosting rather than shared hosting tends to work much better for multisite installs, as it provides predictable resources without other sites on the server competing for memory, CPU and disk. For optimal performance across many live production sites, a modern LEMP or LAMP stack on a dedicated server with multiple cores, plentiful RAM and fast SSD storage will provide the smoothest experience.

While shared hosting is technically feasible for smaller multisite installs, the severe resource constraints typically imposed on shared hosts will likely impede the ability to scale up the number of sites over time. So it's wise to evaluate projected growth upfront when selecting hosting for a multisite environment.

Craft CMS Version Requirements

Utilizing the multisite capabilities in Craft CMS requires version 3.5 or later as a starting point. However, running the absolute latest release of Craft CMS 3.x is highly recommended in order to take advantage of the many multisite-related improvements and optimizations added in recent versions.

For example, Craft CMS 3.5 first introduced multisite support. Craft 3.6 then added multi-environment configuration capabilities for defining per-site environments. Craft 4.0 provided unified user permissions across all sites in the multisite network. Craft 4.2 allowed setting system configuration values on a per-site basis.

Staying current with the latest Craft 3 releases ensures critical security fixes are in place, and performance and stability issues are resolved. Just as importantly, it enables leveraging the most up-to-date multisite features and enhancements. So when evaluating requirements, avoid sticking to older versions of Craft CMS that lack key multisite functionality and improvements.

Database Configuration

On the database side, Craft CMS multisite works with both shared and separate database configurations:

A single shared MySQL or MariaDB database can be utilized by all the sites in the multisite network. This simplifies administration and maintenance, with all data residing in one place and sites able to share common tables. However, a major downside is that issues, errors or performance problems from one site can easily impact other sites using the same database server.

Alternatively, each site can be set up with its own dedicated MySQL/MariaDB database for storing its content, users, entries and other data. While this adds complexity in having to manage multiple databases, it offers much better isolation between the sites. If one site experiences database issues, it won't drag down others. Migrations and schema changes do have to be propagated manually across each database.

For a relatively small number of low-traffic sites, a shared database configuration tends to be easiest from a simplicity and maintenance perspective. But for larger numbers of high-traffic, business-critical sites, dedicating separate databases per site helps contain potential problems. So priorities around simplicity vs isolation should factor heavily in determining the ideal database configuration.

Setting Up Craft CMS Multisite

Enabling Multisite

Enabling multisite capabilities in Craft CMS requires just a couple quick steps. First, open up the config/general.php file and update the $sites configuration array to define the sites that will exist in your multisite network. This involves configuring a sub-array for each site with settings like the site name, handle, language, base URL, and whether it should be the primary site.

After defining the $sites array, the next step is to set the primarySite configuration value to specify which of your defined sites will serve as the primary one for the multisite install. This primary site will be displayed on the control panel dashboard, act as the default home page, determine where admins are redirected after logging in, and set the base admin URL used across all sites in the network. So it's important to choose your primary site carefully upfront, as it will serve as the central hub for managing the multisite environment.

With just those two steps - configuring the $sites array and designating a primarySite - multisite capabilities get enabled in Craft and you're ready to start managing multiple sites from a single control panel. Additional configuration can be done later on an as-needed basis.

Defining Sites

The $sites array defined in config/general.php contains the configuration details for all the sites in the multisite install. Each site gets defined as its own sub-array within $sites, containing settings like:

  • name - The human-readable name of the site

  • handle - The site's handle

  • language - The IETF language code used by the site

  • baseUrl - The base URL for the site

  • primary - Whether this should be the primary site

  • replicateData - Whether to propagate users, entries, etc to this site


For example, a multisite install with an English and French site could have a $sites array configured like:

'sites' => [

[

'name' => 'English Site',

'handle' => 'en',

'language' => 'en-US',

'baseUrl' => 'https://mysite.com/',

'primary' => true,

],

[

'name' => 'French Site'

'handle' => 'fr',

'language' => 'fr-FR',

'baseUrl' => 'https://monsite.ca/',

],

]

Here the first English site is set as the primary site for the network, while French exists as a second site. Additional sites can be added to the array as needed. Defining the handle, base URL, language, and other settings for each site is crucial, since it determines how the sites appear and function both in the control panel and on the frontend.

Configuring the Primary Site

When setting up multisite, choosing the primary site is an important decision. The primary site, defined as the first $sites array item with primary set to true, serves as the default site for the install. For example, the primary site will be displayed on the control panel dashboard, control the site users land on after logging in, and determine the base admin URL used across all sites.

So experiences like logging into the control panel, updating Craft CMS or plugins, and managing user permissions will be in the context of the primary site by default. This means the primary site should typically be the main site that administrators will work with most frequently.

For instance, in a multisite network comprised of a central English website, regional French and German sites, and some additional microsites, the main English site would likely make the most sense as the primary site. This allows it to act as the central hub for managing and administering the broader network of sites powered by the multisite install.

When selecting the primary site, it's also good to consider consistency of admin URLs, choosing the site with the heaviest admin traffic, and designating the primary early on for stability.

Carefully configuring the primary site is key to optimizing the broader admin experience across the multisite environment.

Managing Sites in the Control Panel

The Sites Dashboard

The Sites dashboard within Craft's control panel acts as the central hub for managing all of the sites in a multisite environment. From the primary site, the dashboard can be accessed by going to Settings → Sites. This brings up an overview of all existing sites, displaying details like the site name, handle, language, and status for each one.

With the Sites dashboard, new sites can be created by clicking the "New site" button and configuring the needed settings. Any existing site can be edited directly from its row, allowing tweaks to settings like the site name, handle, base URL, language, and template settings. Sites can also easily be reordered via drag and drop, affecting their order within the control panel.

Each site has a status toggle for activating or deactivating it as needed. Deactivated sites remain defined in the system but are not publicly accessible from the frontend. The Sites dashboard offers a convenient one-stop-shop to fully control sites in the multisite network, from creating and configuring to managing order and status.

Site-specific Utilities and Settings

In addition to core site management capabilities, the Sites dashboard provides handy site-specific utilities accessible directly from each site's row. These include options like Edit Site, Delete Site, Share Site, Disable, Login as User, Clear Caches, and Export Site.

The Edit Site screen allows modifying key settings for that individual site beyond what's in the main $sites config array, like the human-readable site name, site handle, language, base URL, and template settings. The Share Site tool enables propagating users, entries, assets and other content with that site. Utilities like site-specific cache clearing, logging in as different users, and exporting the site enable convenient access to common tasks for each site.

So alongside the core workflow of managing sites, the dashboard also consolidates an array of site-specific utilities for performing many day-to-day multisite administration tasks right from one centralized interface.

Managing Multiple Environments

For developers, the Sites tools provide extensive capabilities for managing staging and production environments across multisite installs. Craft enables defining separate configuration arrays in general.php for development vs live production sites.

This means staging and production environments can have their own distinct versions of sites with different configurations. Content and global sets can then be selectively synced between environments right from the Sites dashboard using the Share Site function. So newly created entries, users, assets, etc. can safely be propagated from development to production sites.

Things like system configuration, custom fields, plugin editions, and template settings can also vary between staging and production to isolate testing changes from live sites. Craft gives enormous flexibility to transparently move content around while maintaining fully separate config and development workflows for each environment.

This unlocks workflows like creating and configuring new sites in staging first, safely testing template and plugin changes, steadily moving vetted content from staging to production, and finally deploying tested configuration tweaks to production when ready.

The ability to orchestrate this complex environment and release management across a large multisite network enables developers to keep risky changes isolated from production sites. So Craft provides extremely robust tools for advanced teams to manage intricate staging and production workflows across their multisite ecosystem.

Setting Up Templates and Themes

Shared vs Site-specific Templates

When setting up templates in a multisite environment, you can choose between shared templates reused across sites and custom templates specific to individual sites. Craft offers flexibility to use a mix of both approaches.

For templates that all sites need, like headers, footers, and shared layouts, global sets provide an easy way to manage them in one place. Global sets act as collections of reusable templates, which sites can inherit from their settings.

So common templates can go in a global set shared across sites. This way changes automatically propagate everywhere. Global sets reduce duplication of boilerplate code.

But sites can still have custom one-off templates building on the shared global set ones. For unique templates, it's better to define them directly in the site rather than the global space. This keeps site-specific templates cleanly separated.

In summary, best practices are:

  • Use global sets for common templates to share across sites

  • Keep custom one-off templates within individual sites

  • Build new templates off shared ones whenever possible

This balanced approach takes advantage of global sets for reuse while allowing customization. Shared templates bring consistency while unique site templates enable flexibility.

Managing Themes

Similar to templates, themes can be managed globally or on a per-site basis. The primary site's theme acts as the default across all sites. But each site can override this with a custom theme.

In Settings → Sites, selecting a site provides the Theme settings for that site specifically. The global theme can be customized here on a site level.

Things like theme colors, typography, and layouts can be tweaked this way. So while keeping a consistent global theme, individual sites can adapt it to their specific needs.

For more advanced customization, each site can switch to a completely different theme. Just select "Custom theme" and choose one of the other installed themes.

So Craft again provides flexibility to balance consistency with customization:

  • Use primary site theme as default everywhere

  • Customize primary theme on a per-site basis

  • Switch individual sites to completely different themes

This allows managing themes globally or overriding with site-specific themes as needed.

Template Blocking by Site

Craft's template blocking feature lets you control which templates should be accessible to each site.

By default, sites inherit all globally available templates. But template blocking allows restricting specific templates on a per-site basis.

For example, to block the "home" template from a site:

  1. Go to Settings → Sites

  2. Select the site

  3. Click Template Settings

  4. Under Template Blocking, check "home"

Now only other sites will be able to access this template. Useful for restricting sites to just their own custom templates.

Template blocking can be applied to:

  • Single templates

  • Whole template groups

  • Global sets

  • *_all folders to block everything

This works independently for each site.

Template blocking gives granular control over which templates each site can route to. It helps limit sites to their intended templates and content structure.

With both global sets and selective blocking, Craft provides powerful options for managing templates across large multisite installs. Shared sets streamline reuse while blocking dials in permissions.

Managing Multisite Content

Globals and Sections

When organizing content across a Craft CMS multisite environment, a combination of shared global sets and site-specific sections offers an optimal approach. Global sets allow defining common reusable content like footer text, navigation menus, and other blocks that need to remain consistent across multiple sites. By creating these shared globals just once in a global set, they can be propagated everywhere efficiently. This avoids the need to duplicate the same global content separately for each individual site. It also ensures that any changes flow automatically across all sites inheriting that global set.

In contrast, sections and entry types that house content unique to just a single site are best defined within that individual site only. This keeps site-specific structures and content properly siloed. So utilizing global sets for common globals paired with per-site sections for unique content structures provides a balanced strategy. Reuse globals for consistency while defining sections within sites for customization.

Entries, Categories and Data

With the underlying structures in place, content creators can focus on producing entries to populate categories across the multisite ecosystem. For entries whose content needs to remain identical across multiple sites, they can be authored once in a single site, then propagated out to other sites using Craft's handy "Share Site" tool. This copies the entries over while preserving any unique metadata like URLs, author names, and SEO titles on a per-site basis. It's a quick way to replicate key pages.

But for content like blog posts or news articles that are inherently site-specific, those are best authored directly in the sections defined for that individual site. This keeps the right content siloed in the right place. Categories can be managed similarly - shared globally when consistency is needed, but custom categories per site where required.

The overarching goal should be achieving balance: propagating certain core entries to all sites when it makes sense, while creating entries in site-specific sections for truly unique content. And sharing common categories globally in some cases while customizing categories on a per-site basis in others. This selective approach allows efficiently managing content across a multisite ecosystem while still tailoring it as required.

Managing Localized Content

For multilingual multisite environments, Craft provides extremely powerful localization tools for managing translated content across sites. The site translations feature enables propagating translations made on one site over to other sites with a single click. This maintains content synchronization across locales while avoiding costly retranslation. However, sites can still override any shared translations on a case-by-case basis if needed. For example, generic text like "About Us" may remain consistent when translated across all sites and languages. But "Contact" could legitimately be customized on a per-site basis.

These types of per-site translation overrides provide the flexibility to adapt globally shared translations wherever required. Translation managers ultimately control this on a granular level. Some best practices for localizing multisite content include: use shared translations by default for maximum efficiency, but allow customizing translations per site if meanings legitimately differ; and rely on translation managers to dictate which translations should be shared verbatim vs overridden on a site basis. This approach strikes the right balance between consistency and customization when localizing content across a multisite system spanning multiple languages.

So in summary, Craft provides tremendous flexibility for managing both shared and unique content across a complex multisite environment, from high-level structures down through categories, entries, and localized translations.

Assets and Media in Multisite

Shared vs Site-specific Assets

When managing assets across multisite, you can choose between shared assets reused across multiple sites or siloed assets unique to each site. It depends on the use case.

For generic assets like logo files, header images, or brand media kits, sharing them globally can simplify management. Shared assets are maintained in one place.

But for site-specific images, videos, and other media, it's better to keep those segregated. For example, blog post images would be unique to their site.

Best practices:

  • Share common brand assets globally

  • Keep site-specific media like blog images separate

  • Use volumes (see below) to organize across sites

So balance asset sharing for efficiency while isolating unique media. Craft's volumes provide tools to manage this.

Managing Volumes

Volumes enable organizing assets across multisite installs, with flexibility for sharing or separating:

Shared volumes can be used across multiple sites for common assets. A "branding" volume with logos propagates everywhere needed.

But standalone volumes for individual sites keep assets separated. The "blog" volume for site A doesn't collide with site B.

Volumes provide structure:

  • Put shared assets in volumes available globally

  • Use site-specific volumes to silo unique media

  • Set permissions on who can access volumes

This allows both consolidating assets for efficiency and isolating them for separation. Craft's field settings even allow picking volumes on a per-site basis.

Image Transforms

Similar to assets, image transforms can be managed globally or per-site:

For consistent transforms like logo thumbnails, a shared global set works across all sites. Changes propagate everywhere.

But custom transforms tailored to specific templates or image content better suit being defined for individual sites only. Keeps things isolated.

When configuring:

  • Use global sets for common transforms like logos

  • Define custom transforms in site-specific sets

  • Set permissions on who can access transform sets

This provides a mix of shared transforms for consistency with the flexibility for per-site customization as needed.

So volumes and transforms allow intelligently consolidating media management across multisite while still keeping custom assets and transforms separated per site. Shared for efficiency, separated for specificity.

Configuring URLs and Domains

Domain Mapping

A fundamental aspect of setting up a Craft CMS multisite environment is mapping domains to each site. This domain mapping gets configured directly at the site level within the control panel. For any given site, you can access its settings, go to the Site Domains section, and enter the primary domain for that site. Additional domains can also be added beyond the primary one as needed. After entering the domains and saving the changes, those domains will now point to the site.

This mapping allows multiple domains to be assigned to the same site if desired. The primary domain holds special significance - it will be used by default for generating front-end URLs and links for the site. So domain mapping establishes the foundation for directing traffic to the proper destinations across the multisite network.

Managing Primary Domains

Choosing the primary domain for each site has important SEO and UX implications:

  • The primary domain appears by default in front-end URLs for the site

  • Craft treats the primary domain as the canonical domain for search engine indexing purposes

  • Internal links get generated using the primary domain

Therefore, the primary domain should be selected carefully with SEO in mind - typically this would be the main domain you want indexed and ranked in search engines for that site.

For example, a multisite environment spanning different regional websites might configure domains like:

Site A

Primary: widgets.com

Additional: widgets.ca

Site B

Primary: widgets.co.uk

Additional: widgets.com

This helps dictate the canonical URL structure Craft will output, with links/URLs defaulting to the primary domain. Additional domains can still be mapped as needed, but the primary domain sets the default.

URL Formatting and Structure

On a per-site basis, Craft multisite allows extensive configuration of URL formatting and structure, including:

  • Subdomain vs. subdirectory - e.g. site.domain.com vs domain.com/site

  • Customizing entry and category URI formats

  • Language-specific URL formats - e.g. domain.com/en vs domain.com/language/en

  • Adding or removing index.php

So both the high-level domain structure and the actual URI formats can be tailored for branding, UX, and SEO purposes. Some best practices include:

  • Subdomains aid isolation and branding differentiation

  • Subfolders can help consolidate domain authority for SEO

  • Customize entry/category URIs per site to be semantically meaningful

  • Structure language URLs based on target audience expectations

The flexible control over URLs and domains is key for optimizing the user experience across a multisite system.

Optimizing SEO for Multisite

Site-specific Metadata

To maximize the SEO value and relevance of each individual site within a multisite ecosystem, it is crucial to utilize unique, customized metadata like titles and descriptions on a per-site basis.

Craft CMS provides the ability to configure SEO metadata at the entry level, which enables tailoring title tags and meta descriptions for key pages that summarize the page's specific content, keywords, and overall locality or niche.

For product sites, relevant product names and attributes can be incorporated organically into titles and descriptions. Location-based sites can include city or region information prominent in metadata. The goal is to avoid simply duplicating generic, identical metadata across all sites in the network. Treating each site as truly distinct by optimizing metadata for its specific audience and search intent is key. This provides the proper indexing context for search engines to understand what each site focuses on.

Internal Linking

Strategic internal linking between sites in a multisite network can tremendously benefit authority sharing and search rankings. For example, liberally linking from root domains to subsidiary sites helps transfer authority and credibility to those子sites. Related sites focused on similar topics or content areas can interlink frequently to reinforce their shared relevance. Larger, more established sites can also link moderately to newer, lower authority sites to give them a boost.

When linking between multisite properties, varying anchor text with relevant keywords can provide optimization signals, but an overly artificial linking structure can actually degrade relevancy. The focus should be on contextual internal links that make sense for site architecture and user navigation. This fosters a natural flow of authority amongst connected sites, aiding search bots in crawling the ecosystem efficiently.

Duplicate Content Prevention

One SEO challenge inherent to multisite environments is avoiding duplicate content across sites, which can confuse and dilute signals for search engines. Some tactics to minimize duplicates include utilizing site redirects where appropriate to consolidate content in one canonical location, leveraging Craft's canonical tag functionality, and ensuring each site has a satisfactory amount of unique content. Thin pages with minimal unique content should be discouraged across the sites.

Completely unique content for each site is ideal. When this isn't feasible, tactics like redirects and canonical tags can instruct search engines on which version of content to index. So taking proactive measures to limit duplicates by way of customization, consolidation, and canonical tags helps preserve the integrity and SEO value of each site.

Managing Users and Permissions

User Accounts

In a multisite environment, user accounts can either be shared across all sites or segregated on a per-site basis:

Shared accounts allow users access to all sites with one login. This simplifies administration and setup with central control. Users only need to be managed in one place.

However, permission restrictions often still need to be implemented on a per-site level to limit access to certain sites (see below).

Per-site accounts keep users and credentials isolated per site. This provides the most granular control and separation, since each site manages users independently. But there is added administrative overhead.

In general, small and medium-sized multisite installs can utilize shared access for easier maintenance. But large networks with hundreds of sites may require per-site accounts for security and organizational needs.

So evaluate the trade-offs of single sign-on access vs per-site permission management. Factor in complexity vs control.

User Groups

For shared user access, user groups are invaluable for managing permissions across a multisite system.

User groups allow defining common access levels, then assigning users to those groups. For example:

  • Editors group - Grants edit access to most sites

  • Blog Contributors - Can only create blog entries

  • Site Managers - Full access to certain sites

By centrally controlling permissions with groups, changes automatically propagate network-wide. Adding a new permission means just updating the group.

This simplifies permission management tremendously while still allowing differentiation. Assign users to multiple groups to grant various access levels.

Per-site Permission Differences

Even with shared user access, tweaking permissions on a per-site basis provides granular control.

For example, blocks like:

{% requirePermission 'editSiteA' %}

{% requirePermission 'postToBlogB' %}

Can restrict access to parts of specific sites.

Permissions for editing entries, creating structures, managing assets, etc. can be customized per site this way.

So this allows certain users access across all sites while still limiting their capabilities based on the site. Additional custom groups and permissions can subdivide access further.

Craft's permission functionality integrates powerfully with user groups for managing complex access scenarios across large multisite installs. Shared groups provide the backbone, while custom per-site permissions fill in specific gaps.


Developing and Maintaining Multisite

Module Development

When developing modules and plugins for multisite environments, some key considerations include:

  • Test for compatibility across multiple sites

  • Ensure any hardcoded URLs work across different domains

  • Make module settings configurable per site

  • Centralize updates to push changes across all sites

Testing plugins across staged multisite environments is crucial to catch any issues early before deploying to production installs.

Any hardcoded links or references should use Craft's site URL helpers to automatically work across different domains. Avoid direct URLs.

For plugins with configuration settings, build in config overrides on a per-site basis. This allows customizing settings as needed.

Finally, leverage Craft's centralized plugin management so that updates get propagated sitewide from one dashboard.

With extra testing and accommodations for multisite built in, custom modules can be developed to work seamlessly across large network installs.

Managing Updates

Applying updates for plugins, modules, and Craft CMS across a multisite system requires careful coordination:

  • Test updates in staging environments before updating production

  • When ready, update plugins/modules from primary site dashboard

  • For Craft CMS updates, adjust update plan if needed

  • Use release notes to evaluate impact across sites

With shared plugin licensing, plugin/module updates can be handled from one primary site dashboard, reducing overhead.

For Craft updates, review changes in advance and potentially delay less urgent releases if needed. Adjust release plans accordingly.

Take time to test updates first in dev environments before deployment. Have rollback plans ready in case issues emerge.

With extra diligence and testing, updates can be managed smoothly across even large, complex multisite networks.

Decoupled and Headless Setups

For decoupled and headless multisite architectures using Craft as a content API, considerations include:

  • Abstracting Craft behind a gateway/proxy service for simplified APIs

  • Exposing content APIs on a per-site basis

  • Integrating Craft data with microservices and CDNs

  • Optimizing Craft for content delivery over page rendering

A content aggregation gateway can normalize content APIs across multisite Craft instances. This simplifies frontend integration.

Craft's multi-environment configs also allow optimized content APIs per stage/region. For example, setting up a US and European API endpoint.

Complex integrations are also possible using Craft as a content hub across a broader microservices architecture.

In headless scenarios, focusing Craft on structured content APIs vs page rendering improves performance for decoupled frontend consumption.

Optimizing Craft CMS Multisite

Template and Asset Caching

To optimize the performance of a Craft CMS multisite environment, maximizing caching for templates, assets, and other front-end data is crucial. Craft's built-in template caching features can be leveraged to avoid repeatedly rendering the same components by caching their HTML output. Asset caching and compression helps reduce image, CSS, and JavaScript file sizes for faster delivery. Enabling control panel resource caching improves backend admin performance by caching expensive queries and API calls.

Cache purging after new deployments clears out stale cached data to avoid old content being shown. And properly configuring cache headers boosts overall caching potential for browsers and proxies. Combined, making effective use of template, asset, and general caching practices can dramatically improve both the front and backend performance of a large, complex multisite system.

Database Optimization

At scale, database optimization becomes critical for optimizing multisite performance. Techniques like adding database indexes for frequently executed queries prevents slow full-table scans.

For installs using separate databases per site, segmenting tables appropriately by site improves manageability. On the database server itself, optimization for read/write efficiency through fast I/O throughput helps significantly. Tuning the MySQL/MariaDB configuration for increased memory usage, query caching, and other performance-related parameters is also impactful. In general, limiting the bloat of unnecessary revisions and stale data keeps storage overhead lower. So especially for large multisite installs, meticulous database-level optimization and configuration is a must.

Image Optimization

To help speed up front-end performance across a multisite system, various image optimization techniques can be applied. Deferred image loading for non-critical images helps accelerate initial page loads. Enabling on-the-fly compression reduces image file sizes. Distributing images via a content delivery network brings them physically closer to visitors.

Setting properly sized transforms for responsive images prevents oversized files from being served. Lazy loading offscreen images avoids wasting bandwidth. Finding the right balance of lossy compression levels improves speed while maintaining quality. Intelligently optimizing and delivering images this way significantly improves multimedia performance across a multisite network.

Shape April 2022 HR 202
Andy Golpys
- Author

Andy has scaled multiple businesses and is a big believer in Craft CMS as a tool that benefits both Designer, Developer and Client. 

Share
Feedback
Show us some love
Email Us
We usually reply within 72 hours
Agency Directory
Submit your agency
Affiliate Partners
Let's chat