Lock configuration with ManagedByDeployment
This task is for administrators who want every configuration change on production to pass version control and the change board. Background: Configuration managed by deployment.
Contents
Before you start
- Settings and templates of the site are in version control, and changes reach production by deployment.
- Nobody relies on the browser's settings or template editor on production (move that work to test).
- A change approved for the lock itself.
Steps
In version control, add to the production administration siteaccess's settings (never written from the admin):
# settings/siteaccess/<admin siteaccess>/site.ini.append.php [ConfigurationSettings] ManagedByDeployment=enabledTo lock only production while test stays editable, put it in the production variant file (
site.ini.prod.append.php, withEXP_ENV=prod) (Set up environment-specific settings). Lock every siteaccess an administrator can use.Deploy, then
php bin/php/ezcache.php --clear-tag=ini --allow-root-userand reload (./console exp:velocity deploy --allow-root-user).
Check it worked
- Setup > Ini settings shows settings but offers no edit;
/settings/editanswers like a disabled view (404 by default). - Setup > Extensions offers no activation; package upload and install are gone; the template editor is not offered.
- Setup > Cache management, System information and Log files still work.
- On the shell,
./console exp:iniandbin/php/*.phpstill work (the deployment's tools).
Pitfalls
- Roles, workflows, sections and states are data in the database: not locked; govern them with roles and the audit trail.
- Installing a package from the command line still writes to the database.
- File permissions on the release directory remain the stronger guard (Check file and directory permissions).
Related pages
- Change management and advisory boards
- Configuration under version control
- Managed by deployment (feature)
- Restricting the administration (hosting)
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
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.