Needs review
Project:
Drupal core
Version:
main
Component:
install system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2026 at 18:24 UTC
Updated:
27 Nov 2026 at 23:17 UTC
Jump to comment: Most recent
Following recent security advisories it may be a good idea to allow (and encourage) sites to disable the installer from settings.php where it cannot be undone without editing code.
Add an installer_access killswitch to settings.php similar to update_free_access.
Set to TRUE in default.settings.php.
Rewrite to FALSE at the end of the installer.
Add a status report message to warn the site owner if it is TRUE.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
catchI'm wondering if we should consider supporting a timestamp here, write it at the beginning of the installer and then only allow a certain window to complete the install (one day? 2 hours?).
We would still use true/false for manually enabling and disabling it but if we use a timestamp that would help to protect against incomplete installs a bit more since at least there'd be a time limit.
Comment #4
longwaveParts of this MR were assisted by Claude Code. Specifically I would not have thought to invalidate the opcache before writing settings.php, and this might be the cause of some weird bugs people have seen immediately after install in some cases?
Comment #5
alexpottI've been considering as non-settings.php kill switch for some reasons:
I was thinking about an empty drupal/ui-installer composer project that we could use as a flag to enable the installer. This obviously does not scale to other problems - and we already have the update access setting - so at least the settings.php solution as precedence on its side.
Reading the code I think this approach is okay. I wish we didn't have to make the file writable again in
install_finished(). One possible improvement is that when installing with the non-interactive installer we should disable the interactive installer much earlier - in the initial write to settings.php by the installer.Also the setting only disables the interactive installer so probably should be labelled along those lines.
Comment #6
alexpottComment #7
alexpottSo the test fails reveal 2 things... this change means that in order to use the interactive installer settings.php must be writable - before it was possible to create a settings php that the webserver couldn't write with everything set up and then use the interactive installer. This change breaks that capability. Which feels a bit dodgy.
Also this change breaks #2122693: Installer does not work on a completely empty settings.php - which might be acceptable - but it is a behaviour change.
Comment #8
catchI think that's OK assuming we add this in 12.0/11.5, we can put it in the release notes.
I think we can still support that if we add timestamp support and if the installer is not writable, leave the timestamp as-is. If it's writable, set it to FALSE.
Comment #9
longwaveFixed the tests for both cases, implemented the timestamp idea (using the same settings key), and renamed everything to "interactive installer" for clarity, all assisted by Claude Code.
Comment #10
longwaveAddressed the feedback.