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

Changing settings with exp:ini

Every verb of the settings command - get, set, add, rem, clear, toggle, copy, move, move-all, where, list, scopes - with its scopes, dry runs, backups, JSON output and exit codes, and recipes for common builder tasks.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/extension-development/part-2-builder/the-exp-ini-command.md

On this page

Changing settings with exp:ini

Part 2, chapter 5. ./console exp:ini (the script bin/php/ini.php) reads and changes settings in every scope from the command line. It writes files line by line, keeping comments, blank lines and order; it writes atomically, keeps a backup, and clears the INI cache afterwards. It is the builder's main tool, and everything on this page comes from its own --help.

The syntax

./console exp:ini <action> <arguments> [options]

A setting is written file/Block/Variable (the .ini suffix is optional); arrays end in [], hash entries in [key]. Two other spellings are accepted: site.ini:SiteSettings.SiteName and "site.ini [SiteSettings] SiteName".

Reading

ActionExampleShows
getexp:ini get site.ini/SiteSettings/SiteNamethe value in effect (or, with a scope, the value one scope's file gives)
whereexp:ini where site.ini/SiteSettings/SiteNameevery file that sets it, in load order, and the result
listexp:ini list site.ini/DebugSettingsthe variables of a block, or the blocks of a file
scopesexp:ini scopes extensionthe scopes of this installation and the directory each writes
actionsexp:ini actionsthe built-in actions and those extensions registered

-s <siteaccess> evaluates get, where and list as that siteaccess sees them. Values of variables named like Password, Secret, Token, Salt or ending in Key are masked unless you pass --show-secrets.

Writing

ActionExampleDoes
setexp:ini set site.ini/SiteSettings/SiteName "My site" globalsets a variable or a hash entry
addexp:ini add 'site.ini/ExtensionSettings/ActiveExtensions[]' mysite_settings globalappends to an array
remexp:ini rem site.ini/SiteSettings/SiteName globalremoves a variable, one array value or one hash entry
clearexp:ini clear 'site.ini/RegionalSettings/SiteLanguageList[]' siteaccess:mysitewrites the reset line, so earlier files' values are dropped
toggleexp:ini toggle site.ini/DebugSettings/DebugOutput globalflips enabled/disabled, true/false, yes/no, 1/0
copyexp:ini copy site.ini/DesignSettings/SiteDesign siteaccess:site siteaccess:gercopies a setting between scopes
moveexp:ini move site.ini/DesignSettings siteaccess:mysite extension:mysite_settingsmoves a block or a whole file
move-allexp:ini move-all siteaccess:mysite extension:mysite_settings:siteaccess:mysite --create-extensionmoves every file of a scope

Put -- before a value that starts with a dash: exp:ini set site.ini/MySettings/Offset -- -1 global.

Scopes

Scope wordFile written
global (or override)settings/override/<file>.ini.append.php
siteaccess:<sa> (or just <sa>)settings/siteaccess/<sa>/<file>.ini.append.php
extension:<ext>extension/<ext>/settings/<file>.ini.append.php
extension:<ext>:siteaccess:<sa>extension/<ext>/settings/siteaccess/<sa>/<file>.ini.append.php
defaultsettings/<file>.ini; refused unless --allow-default (do not use it)

Extensions can register more scopes in ini.ini [IniCommandSettings] ScopeProviders[].

Options that keep you safe

OptionDefaultEffect
--dry-runoffshow the diff, write nothing
--backup / --no-backupbackupcopy the file to var/backup/ini/<timestamp>/ first
--clear-cache / --no-clear-cacheclearclear the INI cache after a write
--create / --no-createcreate for set, add, clear, toggle, copycreate a missing file and block
--jsonoffone JSON object: ok, code, action, message, warnings, data
--root=<dir>the installationwork on another installation's settings tree (a checkout, a copy)

Exit codes: 0 done or nothing to change, 1 usage error, 2 not found, 3 refused, 4 write failed. Scripts can rely on them.

Recipes

Turn on debug output for your own address only:

./console exp:ini set site.ini/DebugSettings/DebugOutput enabled global
./console exp:ini set site.ini/DebugSettings/DebugByIP enabled global
./console exp:ini add 'site.ini/DebugSettings/DebugIPList[]' 192.0.2.10 global

(192.0.2.10 is a documentation address; use yours.)

Give one site its own list of languages:

./console exp:ini clear 'site.ini/RegionalSettings/SiteLanguageList[]' siteaccess:mysite
./console exp:ini add 'site.ini/RegionalSettings/SiteLanguageList[]' eng-US siteaccess:mysite
./console exp:ini add 'site.ini/RegionalSettings/SiteLanguageList[]' ger-DE siteaccess:mysite

Find out why an extension's setting is ignored:

./console exp:ini where design.ini/ExtensionSettings/DesignExtensions -s mysite

Check a change in a checkout before deploying it:

./console exp:ini where site.ini/DesignSettings/SiteDesign --root=/path/to/checkout

From a script

Because of --json and the exit codes, exp:ini is safe to use in deployment scripts:

./console exp:ini get site.ini/SiteSettings/SiteName --json

Read the ok and data fields instead of parsing text.

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