---
title: "TYPO3_CONF_VARS"
manual: "TYPO3 Explained"
version: "11.5"
permalink: "https://docs.typo3.org/permalink/t3coreapi:typo3confvars@11.5"
source: "Configuration/Typo3ConfVars/Index.rst"
rendered: "2026-10-21T15:30:00+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v11 has reached end-of-life as of October 31th 2024 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# TYPO3_CONF_VARS {#typo3confvars}

The main configuration is achieved via a set of global settings
stored in a global array called `$GLOBALS['TYPO3_CONF_VARS']`.

This chapter describes this global configuration in more details and gives hints
to further configuration possibilities.

> [!NOTE]
> This variable can be set in one of the following files:
>
> -   [typo3conf/LocalConfiguration.php](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-localconfiguration@11.5)
> -   [typo3conf/AdditionalConfiguration.php](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-additionalconfiguration@11.5)

## File LocalConfiguration.php {#typo3confvars-localconfiguration}

The global configuration is stored in file `typo3conf/LocalConfiguration.php`.
This file overrides default settings from `typo3/sysext/core/Configuration/DefaultConfiguration.php`.

> [!IMPORTANT]
> Since configuration settings can be manipulated from within the
> TYPO3 CMS backend, the `typo3conf/LocalConfiguration.php`
> must be writable by the web server user.

The local configuration file is basically a long array which is simply returned
when the file is included. It represents the global TYPO3 configuration.
This configuration can be modified/extended/overridden by extensions,
by setting configuration options inside an extension's
`ext_localconf.php` file. [See extension files and locations](https://docs.typo3.org/permalink/t3coreapi:extension-files-locations@11.5)
for more details about extension structure.

A typical content of `typo3conf/LocalConfiguration.php` looks like this:

```php
<?php
return [
   'BE' => [
      'debug' => true,
      'explicitADmode' => 'explicitAllow',
      'installToolPassword' => '$P$Cbp90UttdtIKELNrDGjy4tDxh3uu9D/',
      'loginSecurityLevel' => 'normal',
   ],
   'DB' => [
      'Connections' => [
         'Default' => [
            'charset' => 'utf8',
            'dbname' => 'empty_typo3',
            'driver' => 'mysqli',
            'host' => '127.0.0.1',
            'password' => 'foo',
            'port' => 3306,
            'user' => 'bar',
         ],
      ],
   ],
   'EXTCONF' => [
       'lang' => [
           'availableLanguages' => [
               'de',
               'eo',
           ],
       ],
   ],
   'EXTENSIONS' => [
       'backend' => [
           'backendFavicon' => '',
           'backendLogo' => '',
           'loginBackgroundImage' => '',
           'loginFootnote' => '',
           'loginHighlightColor' => '',
           'loginLogo' => '',
       ],
       'extensionmanager' => [
           'automaticInstallation' => '1',
           'offlineMode' => '0',
       ],
       'scheduler' => [
           'maxLifetime' => '1440',
           'showSampleTasks' => '1',
       ],
   ],
   'FE' => [
      'debug' => true,
      'loginSecurityLevel' => 'normal',
   ],
   'GFX' => [
      'jpg_quality' => '80',
   ],
   'MAIL' => [
      'transport_sendmail_command' => '/usr/sbin/sendmail -t -i ',
   ],
   'SYS' => [
      'devIPmask' => '*',
      'displayErrors' => 1,
      'encryptionKey' => '0396e1b6b53bf48b0bfed9e97a62744158452dfb9b9909fe32d4b7a709816c9b4e94dcd69c011f989d322cb22309f2f2',
      'exceptionalErrors' => 28674,
      'sitename' => 'New TYPO3 site',
   ],
];
```

As you can see, the array is structured on two main levels. The first level
corresponds roughly to a category, the second one being properties, which
may themselves be arrays.

The configuration categories are:

-   **BE**

    [Options related to the TYPO3 backend](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-be@11.5).

-   **DB**

    [Database connection configuration](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-db@11.5).

-   **EXT**

    [Extension installation options](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-ext@11.5).

-   **EXTCONF**

    Backend-related language pack configuration resides here.

-   **EXTENSIONS**

    [Extension configuration](https://docs.typo3.org/permalink/t3coreapi:extension-configuration@11.5).

-   **FE**

    [Frontend-related options](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-fe@11.5).

-   **GFX**

    [Options related to image manipulation.](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-gfx@11.5).

-   **HTTP**

    [Settings for tuning HTTP requests](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-http@11.5) made by TYPO3.

-   **LOG**

    [Configuration of the logging system](https://docs.typo3.org/permalink/t3coreapi:logging-configuration@11.5).

-   **MAIL**

    [Options related to the sending of emails](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-mail@11.5)
    (transport, server, etc.).

-   **SVCONF**

    [Service API configuration](https://docs.typo3.org/permalink/t3coreapi:services-developer-service-api-getters@11.5).

-   **SYS**

    [General options](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-sys@11.5) which may affect both the
    frontend and the backend.

-   **T3_SERVICES**

    [Service registration configuration](https://docs.typo3.org/permalink/t3coreapi:services-configuration-registration-changes@11.5)
    and the backend.

Further details on the various configuration options can be found in the
**Admin Tools** module as well as the TYPO3 source at
`EXT:core/Configuration/DefaultConfigurationDescription.yaml`.
The documentation shown in the **Admin Tools** module is automatically
extracted from those values of `DefaultConfigurationDescription.yaml`.

The **Admin Tools** module provides various dedicated sections that
change parts of `LocalConfiguration.php`, those can be found in
**Admin Tools > Settings**, most importantly section
**Configure installation-wide options**:

![](../../Images/AutomaticScreenshots/AdminTools/AllConfiguration.png)

![](../../Images/AutomaticScreenshots/AdminTools/InstallationWideOptions.png)

## File AdditionalConfiguration.php {#typo3confvars-additionalconfiguration}

Although you can manually edit the `typo3conf/LocalConfiguration.php`
file, it is limited in scope because the file is expected to return
a PHP array. Also the file is rewritten every time an option is
changed in the Install Tool or some other operation (like changing
an extension configuration in the Extension Manager). Thus custom
code cannot reside in that file.

Such code should be placed in the `typo3conf/AdditionalConfiguration.php`
file. This file is never touched by TYPO3, so any code will be
left alone.

Furthermore this file is loaded **after** `typo3conf/LocalConfiguration.php`,
which means it represents an opportunity to change global configuration
values programmatically if needed.

`typo3conf/AdditionalConfiguration.php` is a plain PHP file.
There are no specific rules about what it may contain. However, since
the code is included on **every** request to TYPO3
\- whether frontend or backend - you should avoid inserting code
which requires a lot of processing time.

**Example: Changing the database hostname for development machines**

**typo3conf/AdditionalConfiguration.php**

```php
<?php

$applicationContext = \TYPO3\CMS\Core\Core\Environment::getContext();
if ($applicationContext->isDevelopment()) {
    $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] = 'mysql-be';
}
```

## File DefaultConfiguration.php {#typo3confvars-defaultconfiguration}

TYPO3 comes with some default settings, which are defined in
file `EXT:core/Configuration/DefaultConfiguration.php`.

This is the base configuration, the other files like `LocalConfiguration.php`
just overlay it.

Here is an extract of that file:

```php
return [
    'GFX' => [
        'thumbnails' => true,
        'thumbnails_png' => true,
        'gif_compress' => true,
        'imagefile_ext' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg',
        // ...
    ],
    // ...
];
```

It is certainly interesting to take a look into this file, which also contains
values that are not displayed in the Install Tool and therefore cannot be
changed easily.
