Skip to content

Deployment

Know which parts of a Sites platform travel with exported configuration and which ones live in each environment's database.

Configuration: exported and imported Content: lives in each environment
Site types, with their setting defaults, assignable content and assignable roles Sites, with their settings, configuration overrides, translations and values per environment
The pages under Sites configuration, such as General Who is a member of which site, with which per-site roles
Roles and their permissions Which content belongs to which site, and its origin site
Modules, content types, menus, views, blocks Menu links, URL aliases, redirects and all other content

Configuration

drush config:export and drush config:import carry site types and the platform settings like any other configuration. Change site types on development and import them on the other environments.

Sites are content

A site is created on the environment where it runs:

  • in the admin UI (Create a site);
  • with drush sites:create in a deployment script (Drush);
  • by copying the production database to the other environments.

A module can also declare sites in code; those ship with the code (Site plugins).

The ID of a site is set once, and settings.php addresses the site by it. Give a site the same ID on every environment: Hydrion is hydrion on stage as in production.

Values per environment

A database copied from production carries the production values, hostnames included. Give each environment its own:

  • Hostnames on the site's Identity section, per environment (Hostnames per environment).
  • Other settings on the Environments tab of a settings section, for the settings the site type lets vary by environment, or in settings.php on each server (Setting layers).

Each server names its environment in settings.php (Environments).

Site settings lists the keys and which of them can differ per environment. To see what a site resolves to on an environment:

drush sites:info hydrion --environment=stage

Caches

Give every environment its own cache backend: two environments on one cache serve each other's hostnames (Caching and performance).

Last updated 2026-10-14