---
title: "Maintenance mode: Prevent backend logins during upgrade"
manual: "TYPO3 Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:maintenance-mode@13.4"
source: "Administration/SystemSettings/MaintenanceMode/Index.rst"
rendered: "2026-09-23T17:02:48+00:00"
---

# Maintenance mode: Prevent backend logins during upgrade {#maintenance-mode}

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](https://docs.typo3.org/permalink/t3coreapi:minor@13.4)
and [Major upgrade](https://docs.typo3.org/permalink/t3coreapi:major@13.4),
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 {#maintenance-mode-total}

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\]](https://docs.typo3.org/permalink/t3coreapi:confval-globals-typo3-conf-vars-be-adminonly@13.4)
to `-1`.

It is also possible to add and remove this setting manually to the
[additional.php](https://docs.typo3.org/permalink/t3coreapi:configuration-files@13.4):

**config/system/additional.php | typo3conf/system/additional.php**

```php
// Lock the backend for editors, admins and CLI
$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/bin/typo3`.
Scheduler tasks will also not be triggered.

A similar effect can be achieved by creating a flag file,
[`LOCK_BACKEND`](../../DirectoryStructure/FlagFiles.md#file-var-lock-lock-backend) via console
command:

```bash
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:

```bash
vendor/bin/typo3 backend:unlock
```

> [!TIP]
> If you edit the [`var/lock/LOCK_BACKEND`](../../DirectoryStructure/FlagFiles.md#file-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 {#maintenance-mode-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\]](https://docs.typo3.org/permalink/t3coreapi:confval-globals-typo3-conf-vars-be-adminonly@13.4)
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](https://docs.typo3.org/permalink/t3coreapi:configuration-files@13.4):

**config/system/additional.php | typo3conf/system/additional.php**

```php
// Lock the backend for editors while admins and CLI are still allowed
$GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] = 2;
```
