---
title: "Site settings"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:sitehandling-settings@12.4"
source: "ApiOverview/SiteHandling/SiteSettings.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v12 has reached end-of-life as of April 30th 2026 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 v12 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Site settings {#sitehandling-settings}

<!-- TODO: no Markdown rendering for "versionchanged" -->

Before TYPO3 v12.1 the site settings were stored in the config.yaml
file under the settings key. An upgrade wizard copies the settings
to the new settings.yaml file.Settings are not removed from the config.yaml file for now, but will
not have any effect anymore as soon as a settings.yaml file exists.Please review your settings in the config.yaml file and remove them
manually. Eventually, you need and/or want to adopt your deployment
workflow.

Site settings can be used to provide settings for a site. They can be accessed
via

-   the [\\TYPO3\\CMS\\Core\\Site\\Entity\\Site](https://docs.typo3.org/permalink/t3coreapi:sitehandling-site-object@12.4)
    object in frontend and backend context using PHP
-   the [siteSettings](https://docs.typo3.org/m/typo3/reference-typoscript/12.4/en-us/Functions/Data.html#data-type-siteSettings) key of the
    [data](https://docs.typo3.org/m/typo3/reference-typoscript/12.4/en-us/Functions/Data.html#data-type-gettext) function in
    [TypoScript](https://docs.typo3.org/m/typo3/reference-typoscript/12.4/en-us/Index.html#start)
-   constants in [TypoScript](https://docs.typo3.org/m/typo3/reference-typoscript/12.4/en-us/Index.html#start) or [page TSconfig](https://docs.typo3.org/m/typo3/reference-typoscript/12.4/en-us/PageTsconfig/Index.html#pagetsconfig)
-   as variables (for example, `{site.configuration.settings.mySettingKey}`) in Fluid templates
    using the `SiteProcessor data processor`, see [Using site configuration in TypoScript and Fluid templates](https://docs.typo3.org/permalink/t3coreapi:sitehandling-intyposcript@12.4).

For instance, settings can be used in custom frontend code to deliver features
which might vary per site for extensions. An example may be to configure
storage page IDs.

The settings are defined in the `config/sites/<my_site>/settings.yaml`
file.

## Adding site settings {#sitehandling-settings-add}

Add settings to the `settings.yaml`:

**config/sites/\<my_site>/settings.yaml | typo3conf/sites/\<my_site>/settings.yaml**

```yaml
categoryPid: 658
styles:
  content:
    loginform:
      pid: 23

```

> [!NOTE]
> This example shows how to fill a constant of
> [EXT:felogin](https://docs.typo3.org/c/typo3/cms-felogin/12.4/en-us/Index.html) via site settings
> (`styles.content.loginform.pid`) and configures a custom
> `categoryPid`.

## Accessing site settings in page TSconfig or TypoScript {#sitehandling-settings-access}

```typoscript
// store tx_ext_data records on the given storage page by default (e.g. through IRRE)
TCAdefaults.tx_ext_data.pid = {$categoryPid}

// load category selection for plugin from out dedicated storage page
TCEFORM.tt_content.pi_flexform.ext_pi1.sDEF.categories.PAGE_TSCONFIG_ID = {$categoryPid}
```

> [!NOTE]
> The TypoScript constants are evaluated in this order:
>
> 1.  Configuration from
>     [$GLOBALS\['TYPO3_CONF_VARS'\]\['FE'\]\['defaultTypoScript_constants'\]](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-fe-defaulttyposcript-constants@12.4)
> 1.  Site specific settings from the site configuration
> 1.  Constants from `sys_template` database records
