Installation name: never confuse staging with production again
This page is for teams that run a development copy, a staging copy and a live site side by side. Their browser tabs
look the same, and it is easy to change the wrong one. The installation name feature puts the name of the installation
where you see it: in front of the page title on every installation that is not production, in a comment in the page
head, and wherever a template asks for it. Added on 7 August 2026 (cbfee1241e, classes
ExpInstallationDetailsOutputFilter and ExpInstallationOperator).
Set it up in three steps
Name the installation, and list the names that count as production, in
settings/override/site.ini.append.php:[SiteSettings] EzInstallationName=staging ProductionInstallationList[] ProductionInstallationList[]=liveSwitch the output filter on, in the same file:
[Event] Listeners[]=response/output@ExpInstallationDetailsOutputFilter::filterThe
[Event]block is private API that may change (see the comment insettings/site.ini). Without the listener, the template operators below still work.Clear the INI cache:
php bin/php/ezcache.php --clear-tag=ini --allow-root-user
Check the result on the staging copy:
curl -s https://staging.example.com/ | grep -E '\[I\]|<title>'Expected output, something like:
<!-- [I] staging -->
<title>[staging] Home / My site</title>Settings
The keys are not in the shipped site.ini; add them to settings/override/site.ini.append.php.
| File | Block | Key | Default | Scope | Meaning |
|---|---|---|---|---|---|
settings/site.ini | SiteSettings | EzInstallationName | not set | global | The name of this installation, for example staging. When empty or missing, the feature does nothing. |
settings/site.ini | SiteSettings | ProductionInstallationList[] | not set | global | The names that count as production. If EzInstallationName is in the list, the installation is production. |
settings/site.ini | Event | Listeners[] | not set | global | response/output@ExpInstallationDetailsOutputFilter::filter switches the output filter on |
What it does to a page
| Where | Effect | When |
|---|---|---|
Directly after the first <head> | An invisible comment <!-- [I] staging --> | always, when the name is set |
The first <title> | Becomes <title>[staging] ... | only when the installation is not production |
<!--INSTALLATION_NAME--> | Replaced by the name, or by nothing on production | everywhere in the output |
Only the first <head> and the first <title> are touched, so inline SVG or code samples that contain these words are
left alone. The name is HTML escaped.
Template operators
installation_name() {* staging *}
installation_name( hide_on_prod=true() ) {* empty on production *}
if is_production_system() ... /ifinstallation_name( hide_on_prod ) returns the configured name, or an empty string on production when hide_on_prod
is true. is_production_system() is true when the name is in ProductionInstallationList[].
Example: load analytics only in production.
if is_production_system()
include uri='design:page_head_analytics.tpl'
/ifLimits
- The check is by name: a typo in the list makes the live site look like staging.
- A page that has no
<head>or<title>(a JSON answer) is not altered. - The filter runs on every response that passes the
response/outputevent.
Related pages
- A clean installation that says Exponential
- Multi-site INI overrides, INI override placements
- 6.0.15 changelog
- Chronicle: August 2026
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.