Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Siteaccesses and configuration

How Exponential is configured - INI files read through eZINI, the order in which override directories win, siteaccess matching, per-environment variants with EXP_ENV, configuration managed by the deployment, secrets in…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/software-engineers/siteaccesses-and-configuration.md

On this page

Siteaccesses and configuration

This page is for engineers who need to reason about configuration: where a value comes from, why it differs between two sites of one installation, and how to keep secrets and machine-specific values out of version control. The full reference is The INI settings cascade and INI override directories and placements.

Contents

  1. INI files and eZINI
  2. The order of the cascade
  3. Siteaccesses
  4. Environments, deployments and secrets
  5. Finding where a value comes from
  6. Rules for configuration changes

INI files and eZINI

All configuration is INI files read through eZINI (lib/ezutils/classes/ezini.php). The defaults ship in settings/<file>.ini; overrides are named <file>.ini.append.php (the .php suffix keeps them from being served as text). Code reads a value with:

$value = eZINI::instance( 'site.ini' )->variable( 'SiteSettings', 'SiteName' );

No code in kernel/, lib/ or bin/ parses INI files itself. The merged result is cached as PHP arrays in the INI cache; after a settings change clear it with the tag, which covers both the per-siteaccess and the global INI cache:

php bin/php/ezcache.php --clear-tag=ini --allow-root-user

The order of the cascade

Later wins:

OrderScopeDirectories
0defaultssettings/<file>.ini
1sa-extensionextension/<ext>/settings/ of the extensions in the siteaccess's ActiveAccessExtensions[]
2siteaccessper-siteaccess directories inside extensions (extension/<ext>/settings/siteaccess/<sa>/, settings/override__<group>/, settings/override/), then settings/siteaccess/<sa>/
3extensionextension/<ext>/settings/ of the extensions in ActiveExtensions[] (the first listed wins)
4overridesettings/override/

Two consequences engineers trip over:

  • The settings/ of an extension in ActiveExtensions[] wins over settings/siteaccess/<sa>/; that of an extension in ActiveAccessExtensions[] does not.
  • settings/override/ wins over everything.

Extensions are switched on in site.ini [ExtensionSettings] ActiveExtensions[] (global) and ActiveAccessExtensions[] (per siteaccess); these two cannot be set from inside an extension. The order of extensions can follow their declared dependencies (Extension loading order).

Siteaccesses

A siteaccess is a named configuration selected per request: a public site, the administration, a language version. eZSiteAccess (kernel/classes/ezsiteaccess.php) matches it from site.ini [SiteAccessSettings]:

SettingPurpose
MatchOrderthe match types tried, shipped uri;host;port
AvailableSiteAccessList[]only these siteaccesses are matched
RelatedSiteAccessList[]related siteaccesses sharing the same database
HostMatchMapItems[]host name to siteaccess
AnonymousAccessList[]modules or module views that do not require a sign-in on a siteaccess that otherwise does (user/register, csp/report ...)

Code takes the current siteaccess from eZSiteAccess::current() and never parses the URL itself. Host and language matching: Siteaccess host and language matching.

Environments, deployments and secrets

NeedMechanism
Different values on a developer machine, a test copy and the live siteEXP_ENV in config.env.php (from config.env.php.example), and variant files such as settings/override/site.ini.test.append.php (Settings per environment)
Configuration that only version control may change[ConfigurationSettings] ManagedByDeployment=enabled per siteaccess: the administration no longer writes settings, templates or packages on the server (Configuration managed by the deployment)
Secrets (database passwords, API keys, signing keys)settings/override/, which is never committed; config.env.php is in .gitignore
Several sites in one installationper-site settings inside extensions (Multi-site installations)

Finding where a value comes from

./console exp:ini where site.ini/SiteSettings/SiteName
./console exp:ini get site.ini/SiteSettings/SiteName

where lists every file that sets the value, in load order, and the value in effect; exp:ini also sets, adds and removes values in a chosen scope (exp:ini). On a running installation the administration shows the merged settings under Setup (The settings page).

Rules for configuration changes

  • A new setting gets its default in the shipped settings/<file>.ini with a comment above it, a safe default, a section on its feature page and a line in the changelog.
  • New switches use enabled/disabled.
  • Settings are written with ./console exp:ini or eZINI::save(), never by string replacement in a script.
  • A new class referenced from a shipped INI file should be guarded with class_exists() in the kernel, because a Velocity worker started before the deploy does not know it (Deploying a change).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x