Setting layers¶
Where the value of a site's setting comes from, and how to pin one on a server.
The layers¶
A setting takes its value from the highest layer that sets one:
| Layer | Set on |
|---|---|
settings.php |
the server, see below |
| Environment | the section's Environments tab |
| Language | the section's Translate tab |
| Site value | the section's Edit tab |
| Inherited value | the site the site inherits from, see below |
| Site type preset | the type's matrix, Preset value |
| Module default | the module that adds the setting |
The site type decides which layers a setting has: a site value only where the row has Value per site, an environment value only with Value per environment, a language value only with Value per language, an inherited value only with Inherited value. A value for one language in one environment wins over both. An inherited value the site may not replace wins over the site's own layers.
The tabs of a section¶
Each settings section of a site, like Site information or Appearance, edits one layer per tab:
- Edit: the site's own values.
- Translate: one language's values. It shows when the Language module is installed, the site speaks more than one language and the type makes one of the section's settings Value per language.
- Environments: one environment's values, with each environment listed as Inherited or Overridden. It shows when an environment besides the default exists and the type allows Value per environment for one of the section's settings.
A field shows the value in effect for its layer and names where an inherited value comes from. Saving stores only what differs from the layer below. See Site settings for editing.
Environments¶
Environments come from the
Environment Context module,
which Sites requires. With its
Config Split submodule,
each Config Split is an environment; with its
Environment Indicator submodule,
each Environment Indicator environment. Each server names its environment by machine name in
settings.php, or in the DRUPAL_ENVIRONMENT environment variable:
$settings['environment'] = 'local';
Sites inherit¶
A site inherits from one site: the one chosen under Inherit from on its Inheritance section, else, for a sub-site, its main site. A main site without a choice inherits nothing. Which settings it takes is the site type's matrix: a row with Inherited value takes the source site's value in effect (same language, same environment, what the source inherits itself included) over the type's preset and the module's default. Hydrion UK takes Hydrion's slogan.
With Editable inherited value the site may replace the value: a different value on any of its layers is its own from then on, the same value inherits again. Without it the field is read-only, the source's value applies on every layer, and a different value is refused: Hydrion UK runs with Hydrion's theme.
A site's identity (ID, title, structure, hostnames) and its secrets, like a password, are never inherited; the matrix shows a ❌ there. Changing the source's value changes every site inheriting it at once, in a chain as well. The Inheritance section of a site lists the rules its type sets, with what each setting holds now; only a platform administrator chooses the source, since it decides whose values the site runs with.
settings.php¶
A value in settings.php wins over every other layer. The key is the site's
ID, the entries are setting keys from the
settings reference:
// Sites analytics: the Matomo site of Hydrion on this server.
$settings['hydrion'] = [
'matomo_site_id' => '12',
'matomo_url' => 'https://matomo.valtora.example/',
];
The value stays out of the database and the configuration export. The admin
UI keeps showing the saved value; drush sites:info hydrion lists the
settings.php value under settings.
Keep hostnames out of settings.php: a hostname there changes the site's
links, while requests reach the site on neither the old nor the new hostname.
Set hostnames per environment on the Identity section; see
Hostnames.
Configuration overrides per site¶
A setting marked "Config" in the reference changes Drupal configuration on
one site only. A site's Site name replaces the platform's site name on the
site's hostname, its Theme the default theme; the hub keeps the platform's
configuration. These per-site values belong to the site, like its content:
they are not part of the configuration export. drush sites:info hydrion
lists them under overrides.
Last updated 2026-10-16