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.

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:

config/system/additional.php | typo3conf/system/additional.php
// Lock the backend for editors, admins and CLI are allowed
$GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] = -1;
Copied!

This setting excludes any user, including administrators like yourself from accessing the TYPO3 backend or using any console command in vendor/bin/typo3. 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
Copied!

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
Copied!

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:

config/system/additional.php | typo3conf/system/additional.php
// Lock the backend for editors while admins and CLI are still allowed
$GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] = 2;
Copied!