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

Change settings from the command line: exp:ini

This page is for administrators and developers who change INI settings. One command reads and changes settings in every scope: the global override, a siteaccess, an extension, an extension siteaccess. It edits files…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/features/6.0/exp-ini-command.md

On this page

Change settings from the command line: exp:ini

This page is for administrators and developers who change INI settings. One command reads and changes settings in every scope: the global override, a siteaccess, an extension, an extension siteaccess. It edits files line by line, so comments, blank lines and order stay as you wrote them (unlike eZINI::save(), which rewrites the whole file). Added 2026-10-02. Full reference with every action's output: console exp:ini.

Warning

.htaccess slows down every request. When .htaccess files are enabled (AllowOverride anything but None), let alone used, Apache looks for them and reads and evaluates them on every request, in every directory of the path, and page loading times go up drastically (measured). The only real fix is to switch the feature off for the virtual host: AllowOverride None in the HTTPS virtual host, and the rules in the virtual host's own configuration as mod_rewrite rules. That is far faster in production speed tests and well worth the time it takes to optimize a production configuration. Switch over right away: copy the rules of the example HTTPS virtual host into your virtual host (with the static cache, also staticcache_offload.conf), set AllowOverride None, run apachectl configtest, reload Apache and test the site. The same rules for other servers: nginx, LiteSpeed, Caddy, IIS, Velocity (built in); where virtual host rules go in a control panel: Plesk, cPanel, DirectAdmin, ISPConfig. On LiteSpeed or OpenLiteSpeed, the server's own page cache can also answer anonymous visitors and crawlers without PHP: Page caching with LiteSpeed and OpenLiteSpeed.

Five commands that cover most of a day

./console exp:ini set site.ini/SiteSettings/SiteName "My site" global --allow-root-user
./console exp:ini get site.ini/SiteSettings/SiteName --allow-root-user
./console exp:ini toggle site.ini/ContentSettings/ViewCaching global --allow-root-user
./console exp:ini where cronjob.ini/CronjobPart-publishing/Scripts --allow-root-user
./console exp:ini rem site.ini/SiteSettings/SiteName siteaccess:admin --allow-root-user
  • php bin/php/ini.php ... is the same command.
  • exp:ini --help lists the actions; exp:ini help <action> explains one.
  • Add --dry-run to see what would happen without writing.

Scopes

ScopeFile written
global (or override)settings/override/<file>.ini.append.php
siteaccess:<sa> or <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

Actions

ActionWhat it does
getPrint a value
setWrite a value
addAdd to an array, without duplicates
remRemove a value
clearWrite the reset line Variable[]
toggleFlip enabled/disabled, true/false, yes/no, on/off, 1/0, keeping your spelling
copy, move, move-allCopy or move settings, for example into an extension
whereEvery file that sets a variable, in load order, and the value in effect; lists the files of inactive extensions too
list, scopes, actionsList settings, scopes and actions

What it does for safety

  • A backup of each changed file goes to var/backup/ini/<timestamp>/.
  • Saving as the site user keeps the file's group (it rewrites in place when the group cannot be set).
  • Settings writes are recorded in the audit trail as system.setting.write; secrets are recorded as [secret].

Extending

Actions and scope providers are classes registered in settings/ini.ini [IniCommandSettings]. Setup > RAD at /setup/radsurvey/(show)/inicommand lists each with its owner. The same editor class (expIniEditor) is behind the debug bar's settings tab.

See also: config.php

exp:ini handles the INI files in settings/ and extensions. The constants in config.php (file modes, INI checks, cluster storage, log rotation), which are read before any INI file, are handled by their own commands: exp:config:list, exp:config:get, exp:config:set and exp:config:unset, with exp:setup:config to put the file into place. They follow the same rules: a dry run without --apply, a backup of each changed file (to var/backup/config/<time>/) and masked secrets. See Setting up .htaccess and config.php from the console and Console commands for .htaccess and config.php.

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