|
| 1 | +:navigation-title: Maintenance Mode |
| 2 | +.. include:: /Includes.rst.txt |
| 3 | +.. _maintenance-mode: |
| 4 | + |
| 5 | +======================================================= |
| 6 | +Maintenance mode: Prevent backend logins during upgrade |
| 7 | +======================================================= |
| 8 | + |
| 9 | +Set the backend into maintenance mode to prevent editors or even all |
| 10 | +administrators and CLI tools to access the TYPO3 backend. |
| 11 | + |
| 12 | +The maintenance mode is useful to prevent changes to the content during |
| 13 | +`Patch/Bugfix update <https://docs.typo3.org/permalink/t3coreapi:minor>`_ |
| 14 | +and `Major upgrade <https://docs.typo3.org/permalink/t3coreapi:major>`_, |
| 15 | +database backups or in any other case where you want to prevent backend |
| 16 | +users from accessing the backend. |
| 17 | + |
| 18 | +.. note:: During maintenance mode the TYPO3 frontend works as usual. Depending |
| 19 | + on your sites functionality, frontend actions might continue to alter |
| 20 | + certain database tables or files in the file system. |
| 21 | + |
| 22 | +.. _maintenance-mode-total: |
| 23 | + |
| 24 | +Total shutdown for maintenance purposes |
| 25 | +======================================= |
| 26 | + |
| 27 | +A system maintainer can achieve total TYPO3 backend shutdown for maintenance |
| 28 | +purposes in module |
| 29 | +:guilabel:`Admin Tools > Settings > Configure Installation-Wide Options` |
| 30 | +by setting :ref:`[BE][adminOnly] <t3coreapi:confval-globals-typo3-conf-vars-be-adminonly>` |
| 31 | +to `-1`. |
| 32 | + |
| 33 | +It is also possible to add and remove this setting manually to the |
| 34 | +`additional.php <https://docs.typo3.org/permalink/t3coreapi:configuration-files>`_: |
| 35 | + |
| 36 | +.. code-block:: php |
| 37 | + :caption: config/system/additional.php | typo3conf/system/additional.php |
| 38 | +
|
| 39 | + // Lock the backend for editors, admins and CLI are allowed |
| 40 | + $GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] = -1; |
| 41 | +
|
| 42 | +This setting excludes any user, including administrators like yourself from |
| 43 | +accessing the TYPO3 backend or using any console command in `vendor/bin/typo3`. |
| 44 | +Scheduler tasks will also not be triggered. |
| 45 | + |
| 46 | +A similar effect can be achieved by creating a flag file, |
| 47 | +:ref:`LOCK_BACKEND <t3coreapi:confval-flag-file-lock-backend>` via console |
| 48 | +command: |
| 49 | + |
| 50 | +.. code-block:: bash |
| 51 | +
|
| 52 | + vendor/bin/typo3 backend:lock |
| 53 | +
|
| 54 | +The flag file prevents any backend access, even by an administrator, it does |
| 55 | +however not disable the console command tool and can therefore be disabled |
| 56 | +via command: |
| 57 | + |
| 58 | +.. code-block:: bash |
| 59 | +
|
| 60 | + vendor/bin/typo3 backend:unlock |
| 61 | +
|
| 62 | +.. tip:: |
| 63 | + If you edit the :ref:`var/lock/LOCK_BACKEND <t3coreapi:confval-flag-file-lock-backend>` |
| 64 | + file and put a valid URL into this file, users trying to log into the backend |
| 65 | + are redirected to that URL instead of being shown an error message. You can |
| 66 | + use this feature to show a custom maintenance message. |
| 67 | + |
| 68 | +.. _maintenance-mode-editors: |
| 69 | + |
| 70 | +Lock the TYPO3 backend for editors |
| 71 | +================================== |
| 72 | + |
| 73 | +To prevent an installation's editors from logging into the TYPO3 backend during |
| 74 | +maintenance, go to module |
| 75 | +:guilabel:`Admin Tools > Settings > Configure Installation-Wide Options` |
| 76 | +and set :ref:`[BE][adminOnly] <t3coreapi:confval-globals-typo3-conf-vars-be-adminonly>` |
| 77 | +to `2` if you additionally want to block console commands including scheduler |
| 78 | +tasks, set it to `1`. |
| 79 | + |
| 80 | +It is also possible to add and remove this setting manually in the |
| 81 | +`additional.php <https://docs.typo3.org/permalink/t3coreapi:configuration-files>`_: |
| 82 | + |
| 83 | +.. code-block:: php |
| 84 | + :caption: config/system/additional.php | typo3conf/system/additional.php |
| 85 | +
|
| 86 | + // Lock the backend for editors while admins and CLI are still allowed |
| 87 | + $GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] = 2; |
0 commit comments