TYPO3 Low Level 

Extension key

lowlevel

Package name

typo3/cms-lowlevel

Version

13.4

Language

en

Author

TYPO3 contributors

License

This document is published under the Creative Commons BY 4.0 license.

Rendered

Tue, 14 Oct 2025 10:58:36 +0000


The Low Level extension provides command line scripts for technical analysis of the system. This includes raw database search, checking relations, counting pages and records.


Introduction 

Gives an introduction on what this extension can be used for. Aims at new system administrators and developers.

Command line 

Explains the commands provided by the lowlevel extension and how to use them.

Backend modules 

Explains the two backend modules System > Configuration and System > DB Check provided by this extension.

Table of Contents:

EXT:lowlevel: Modules and tools to handle internal lowlevel data 

For various reasons your TYPO3 installation may over time accumulate data with integrity problems or data you wish to delete completely. For instance, why keep old versions of published content? Keep that in your backup - don't load your running website with that overhead!

Or what about deleted records? Why not flush them - they also fill up your database and filesystem and most likely you can rely on your backups in case of an emergency recovery?

Also, relations between records and files inside TYPO3 may be lost over time for various reasons.

If your website runs as it should such "integrity problems" are mostly easy to automatically repair by simply removing the references pointing to a missing record or file.

However, it might also be "soft references" from eg. internal links ( <a href="t3://page?id=123">...</a>) or a file referenced in a TypoScript template ( something.file = fileadmin/template/miss_me.jpg) which are missing. Those cannot be automatically repaired but the cleanup script incorporates warnings that will tell you about these problems if they exist and you can manually fix them.

These scripts provide solutions to these problems by offering an array of tools that can analyze your TYPO3 installation for various problems and in some cases offer fixes for them.

Installation of system extension lowlevel 

The extension typo3/cms-lowlevel is part of the TYPO3 Core, but not installed by default.

Table of contents

Installation with Composer 

Check whether you are already using the extension with:

composer show | grep lowlevel
Copied!

This should either give you no result or something similar to:

typo3/cms-lowlevel       v12.4.11
Copied!

If it is not installed yet, use the composer require command to install the extension:

composer require typo3/cms-lowlevel
Copied!

The given version depends on the version of the TYPO3 Core you are using.

Installation in classic mode 

In a classic-mode installation (without Composer), the extension is already shipped but might not be activated yet. Activate it as follows:

  1. In the backend, navigate to the Admin Tools > Extensions module.
  2. Click the Activate icon for the Lowlevel extension.
Extension manager showing Lowlevel extension

Extension manager showing Lowlevel extension

Backend modules provided by EXT:lowlevel 

The Lowlevel system extension provides two backend modules:

DB Check 

Offers modules that search or give statistics about the database.

Configuration 

Gives insights into different configuration values. In cases where the final configuration gets combined at different levels this module can be used to debug the final output. Configuration values cannot be changed in this module.

Module System > DB Check 

Access this module in the TYPO3 backend under System > DB Check.

The DB Check module Overview page

Record statistics 

Gives you an overview of how many pages of which type and how many records of any table are present in the current system.

Database Relations 

Gives an overview of the count of lost relations in select and group fields

Full Search 

Search the complete database or specific table / field combinations and offers you detail and edit links to jump directly to the records found.

Manage Reference Index 

Can be used on smaller installations to check or update the reference index.

Records Statistics 

Users with administrator rights can find this module at System > DB Check > Records Statistics.

This module gives an overview of the count of records of different types.

The Records Statistics action

Database Relations 

Users with administrator rights can find this module at System > DB Check > Database Relations.

The module gives some overview of missing relations in fields of the TCA types select and group.

The Database Relations action

Manage Reference Index 

The reference index in TYPO3 is the table sys_refindex. (Related link: Soft references). The table contains all relations/cross correlations between datasets. For example a content element has an image and a link. These two references can be found in this table stored against this unique data record (tt_content uid).

When you want to perform a TYPO3 update it is recommended to update these relations. See Update Reference Index.

To perform an update you can use the TYPO3 Console command shown in that section.

TYPO3 installations with a small number of records can use the module System > DB check and use the Manage Reference Index function.

On TYPO3 installations with a large number of records and many relations between those the maximum run time of PHP will be reached and the scripts therefore fail. It is recommended to run the commands from the command line. This module outputs the commands with absolute paths to update or check the reference from the command line.

The Manage Reference Index action

Module System > Configuration 

The Configuration module allows integrators to view and validate the global configuration of TYPO3. The module displays all relevant global variables such as TYPO3_CONF_VARS, TCA and many more, in a tree format which is easy to browse through. Over time this module got extended to also display the configuration of newly introduced features like the middleware stack or the event listeners.

Using the Configuration module to view global variables 

Overview of the configuration backend module

The Configuration module with menu entry (1), Configuration selector (2), Search box (3) and Configuration tree

  1. Access this module in the TYPO3 backend under System > Configuration.
  2. Select the desired configuration entry in the upper menu bar.
  3. To find a configuration setting quickly enter a phrase in the search box.

    Is is also possible to use a regular expression for the search phrase. Click on the dropdown box and enable the Use regular expression checkbox.

  4. The configuration tree of the selected entry is displayed.

    Expand and collapse the settings with clicking on the triangle.

The Configuration module displays various configuration settings:

Extending the Configuration module 

To make this module more powerful a dedicated API is available which allows extension authors to extend the module so they can expose their own configurations.

By the nature of the API it is even possible to not just add new configuration but to also disable the display of existing configuration, if not needed in the specific installation.

Configuration module provider: Basic implementation 

To extend the configuration module, a custom configuration provider needs to be registered. Each "provider" is responsible for one configuration. The provider is registered as a so-called "configuration module provider" by tagging it in the Services.yaml file. The provider class must implement the EXT:lowlevel/Classes/ConfigurationModuleProvider/ProviderInterface.php (GitHub).

The registration of such a provider looks like the following:

EXT:my_extension/Configuration/Services.yaml
myextension.configuration.module.provider.myconfiguration:
    class: 'Vendor\Extension\ConfigurationModuleProvider\MyProvider'
    tags:
        - name: 'lowlevel.configuration.module.provider'
          identifier: 'myProvider'
          before: 'beUserTsConfig'
          after: 'pagesTypes'
Copied!

A new service with a freely selectable name is defined by specifying the provider class to be used. Further, the new service must be tagged with the lowlevel.configuration.module.provider tag. Arbitrary attributes can be added to this tag. However, some are reserved and required for internal processing. For example, the identifier attribute is mandatory and must be unique. Using the before and after attributes, it is possible to specify the exact position on which the configuration will be displayed in the module menu.

The provider class has to implement the methods as required by the interface. A full implementation would look like this:

EXT:my_extension/Classes/ConfigurationModule/MyProvider.php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\Configuration\Processor\ConfigurationModule;

use TYPO3\CMS\Lowlevel\ConfigurationModuleProvider\ProviderInterface;

final class MyProvider implements ProviderInterface
{
    private string $identifier;

    public function __invoke(array $attributes): self
    {
        $this->identifier = $attributes['identifier'];
        return $this;
    }

    public function getIdentifier(): string
    {
        return $this->identifier;
    }

    public function getLabel(): string
    {
        return 'My custom configuration';
    }

    public function getConfiguration(): array
    {
        $myCustomConfiguration = [
            // the custom configuration
        ];

        return $myCustomConfiguration;
    }
}
Copied!

The __invoke() method is called from the provider registry and provides all attributes, defined in the Services.yaml. This can be used to set and initialize class properties like the :php$identifier which can then be returned by the required method getIdentifier(). The getLabel() method is called by the configuration module when creating the module menu. And finally, the getConfiguration() method has to return the configuration as an array to be displayed in the module.

There is also the abstract class EXT:lowlevel/Classes/ConfigurationModuleProvider/AbstractProvider.php (GitHub) in place which already implements the required methods; except getConfiguration(). Please note, when extending this class, the attribute label is expected in the __invoke() method and must therefore be defined in the Services.yaml. Either a static text or a localized label can be used.

Since the registration uses the Symfony service container and provides all attributes using __invoke(), it is even possible to use dependency injection with constructor arguments in the provider classes.

Displaying custom values from $GLOBALS 

If you want to display a custom configuration from the $GLOBALS array, you can also use the already existing \TYPO3\CMS\Lowlevel\ConfigurationModuleProvider\GlobalVariableProvider . Define the key to be exposed using the globalVariableKey attribute.

This could look like this:

EXT:my_extension/Configuration/Services.yaml
myextension.configuration.module.provider.myconfiguration:
    class: 'TYPO3\CMS\Lowlevel\ConfigurationModuleProvider\GlobalVariableProvider'
    tags:
        - name: 'lowlevel.configuration.module.provider'
          identifier: 'myConfiguration'
          label: 'My global var'
          globalVariableKey: 'MY_GLOBAL_VAR'
Copied!

Disabling an entry 

To disable an already registered configuration add the disabled attribute set to true. For example, if you intend to disable the T3_SERVICES key you can use:

EXT:my_extension/Configuration/Services.yaml
lowlevel.configuration.module.provider.services:
    class: TYPO3\CMS\Lowlevel\ConfigurationModuleProvider\GlobalVariableProvider
    tags:
        - name: 'lowlevel.configuration.module.provider'
          disabled: true
Copied!

Blinding configuration options 

Sensitive data (like passwords or access tokens) should not be displayed in the configuration module. Therefore, the PSR-14 event ModifyBlindedConfigurationOptionsEvent is available to blind such configuration options.

Command line tools provided by EXT:lowlevel 

Preparations 

Always make a complete backup of your website! That means:

  • Dump the complete database to an SQL file. This can usually be done from the command line like this:

    mysqldump [database name] -u [database user] -p --add-drop-table > ./mywebsite.sql
    Copied!
  • Save all files in the webroot of your site. This can be achieved from the command line like this:
tar czf ./mywebsite.tgz [webroot directory of your site]
Copied!

It could be a good idea to run a myisamchk on your database just to make sure MySQL has everything pulled together right.

Something like this will do:

myisamchk [path_to_mysql_databases]/[database_name]/*.MYI -s -r

Copied!

Running the script 

The "[base command]" is:

[typo3_site_directory]/typo3/sysext/core/bin/typo3
Copied!

Try this first. If it all works out you should see a help-screen. Otherwise there will be instructions about what to do.

You can use the script entirely by following the help screens. However, through this document you get some idea about the best order of events since they may affect each other.

For each of the tools in the test you can see a help screen by running:

[base command] --help [toolkey]
Copied!

Example with the tool "orphan_records":

[typo3_site_directory]/typo3/sysext/core/bin/typo3 --help cleanup:orphanrecords

Copied!

Suggested order of clean up 

The suggested order below assumes that you are interested in running all these tests. Maybe you are not! So you should check the description of each one and if there is any of the tests you wish not to run, just leave it out.

It kind of gets simpler that way since the complexity mostly is when you wish to run all tests successively in which case there is an optimal order that ensures you don't have to run the tests all over again.

  • [base command] cleanup:orphanrecords

    • As a beginning, get all orphaned records out of the system since you probably want to. Since orphan records may keep some missing relations from being detected it's a good idea to get them out immediately.
  • [base command] cleanup:deletedrecords

    • Flush deleted records. As a rule of thumb, tools that create deleted records should be run before this one so the deleted records they create are also flushed (if you like to of course).
  • [base command] cleanup:missingrelations

    • Remove missing relations at this point.
    • If you get an error like this: "TYPO3CMSCoreDatabaseReferenceIndex::setReferenceValue(): ERROR: No reference record with hash="132ddb399c0b15593f0d95a58159439f" was found!" just run the test again until no errors occur. The reason is that another fixed reference in the same record and field changed the reference index hash. Running the test again will find the new hash string which will then work for you.
  • [base command] cleanup:flexforms

    • After the "deleted" tool since we cannot clean-up deleted records and to make sure nothing important is cleaned up.

Nightly reports of problems in the system 

If you wish to scan your TYPO3 installations for problems with a cronjob or so, a shell script that outputs a report could look like this:

#!/bin/sh
[typo3_site_directory]/typo3/sysext/core/bin/typo3 cleanup:orphanrecords -vv --dry-run
[typo3_site_directory]/typo3/sysext/core/bin/typo3 cleanup:deletedrecords -v --dry-run
[typo3_site_directory]/typo3/sysext/core/bin/typo3 cleanup:missingrelations --update-refindex -vv --dry-run
[typo3_site_directory]/typo3/sysext/core/bin/typo3 cleanup:flexforms -vv --dry-run

Copied!

You may wish to change the verbosity level from -vv to -v as in the case above, depending on how important you consider the warnings.

The output can then be put into a logfile so the logging system can report errors.

You might also wish to disable tests like "deleted" which would report deleted records - something that might not warrant a warning, frankly speaking ...

Example script for checking your installation 

#!/bin/sh
./typo3/sysext/core/bin/typo3 cleanup:orphanrecords -vv --dry-run
./typo3/sysext/core/bin/typo3 cleanup:deletedrecords -v --dry-run
./typo3/sysext/core/bin/typo3 cleanup:missingrelations -vv --dry-run
./typo3/sysext/core/bin/typo3 cleanup:flexforms -vv --dry-run

Copied!

Example script for cleaning your installation 

#!/bin/sh
./typo3/sysext/core/bin/typo3 cleanup:orphanrecords -vv
./typo3/sysext/core/bin/typo3 cleanup:deletedrecords -v
./typo3/sysext/core/bin/typo3 cleanup:missingrelations -vv --update-refindex
./typo3/sysext/core/bin/typo3 cleanup:flexforms -vv
Copied!

Configuration of the EXT:lowlevel modules 

TSconfig 

Configures display and function of the backend modules.

PSR-14 events in EXT:lowlevel 

The following PSR-14 event is available to extend the functionality:

ModifyBlindedConfigurationOptionsEvent 

The event allows to blind (hide) any configuration options. Usually such options are passwords or other sensitive information. More details

Sitemap