Maintenance mode: Prevent backend logins during upgrade
Set the backend into maintenance mode to prevent editors or even all administrators and CLI tools to access the TYPO3 backend.
The maintenance mode is useful to prevent changes to the content during Patch/Bugfix update and Major upgrade, database backups or in any other case where you want to prevent backend users from accessing the backend.
Note
During maintenance mode the TYPO3 frontend works as usual. Depending on your sites functionality, frontend actions might continue to alter certain database tables or files in the file system.
Total shutdown for maintenance purposes
A system maintainer can achieve total TYPO3 backend shutdown for maintenance
purposes in module
Admin Tools > Settings > Configure Installation-Wide Options
by setting [BE][adminOnly]
to -1
.
It is also possible to add and remove this setting manually to the additional.php:
// Lock the backend for editors, admins and CLI are allowed
$GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] = -1;
This setting excludes any user, including administrators like yourself from
accessing the TYPO3 backend or using any console command in vendor/
.
Scheduler tasks will also not be triggered.
A similar effect can be achieved by creating a flag file, LOCK_BACKEND via console command:
vendor/bin/typo3 backend:lock
The flag file prevents any backend access, even by an administrator, it does however not disable the console command tool and can therefore be disabled via command:
vendor/bin/typo3 backend:unlock
Tip
If you edit the var/lock/LOCK_BACKEND file and put a valid URL into this file, users trying to log into the backend are redirected to that URL instead of being shown an error message. You can use this feature to show a custom maintenance message.
Lock the TYPO3 backend for editors
To prevent an installation's editors from logging into the TYPO3 backend during
maintenance, go to module
Admin Tools > Settings > Configure Installation-Wide Options
and set [BE][adminOnly]
to 2
if you additionally want to block console commands including scheduler
tasks, set it to 1
.
It is also possible to add and remove this setting manually in the additional.php:
// Lock the backend for editors while admins and CLI are still allowed
$GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] = 2;