> For the complete documentation index, see [llms.txt](https://www.one.thezero.club/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.one.thezero.club/guide/installation/config-options.md).

# Config options

A reminder that Kirby config options docs can be found at <https://getkirby.com/docs/guide/configuration>, but here we will explain what is in the Zero One theme config.&#x20;

### Multi-environment Setup (Recommended)

Kirby allows you to split your configuration into multiple files based on the current environment. While this setup is optional, we strongly recommend using it for all Zero One projects.

Instead of placing all custom configuration options inside `site/config/config.php`, you can organize them into separate files:

```
# Example setup

site/config/
├── config.php
├── config.localhost.php
├── config.staging.your-domain.com.php
├── config.your-domain.com.php 
└── config.www.your-domain.com.php
```

{% hint style="info" %}
Learn more in the [Kirby official guide](https://getkirby.com/docs/guide/configuration#multi-environment-setup).&#x20;
{% endhint %}

This approach provides several advantages:

* Keeps your configuration cleaner and easier to maintain.
* Separates local, staging, and production settings.
* Makes troubleshooting easier.
* Prevents your main configuration file from becoming cluttered with customizations.
* Makes future Zero One updates easier to apply.

{% hint style="warning" %}
**Important:** Some Zero One updates may occasionally require changes to the default `config.php` file. If all your custom settings are stored there as well, updating becomes more difficult and increases the risk of merge conflicts or accidentally overwriting your changes.
{% endhint %}

For this reason, we recommend keeping `config.php` as minimal as possible and storing most customizations inside environment-specific configuration files whenever possible.

### How Multi-environment Configuration Works

When using a multi-environment setup, Kirby first loads the main:

```
site/config/config.php
```

and then loads the matching environment configuration file, for example:

```
site/config/config.localhost.php
```

or

```
config.www.your-domain.com.php
```

The environment-specific configuration extends the main configuration and can override any option defined in `config.php`.

#### Example

Main configuration:

{% code title="site/config/config.php" %}

```php
return [

    'debug' => false,

    'cache' => [
        'pages' => true
    ],

];
```

{% endcode %}

Local development configuration:

{% code title="site/config/config.localhost.php" %}

```php
return [

    'debug' => true,

];
```

{% endcode %}

In this case, Kirby will use:

```php
'debug' => true
```

because the environment-specific configuration overrides the value from `config.php`.

However, the cache configuration is still inherited from `config.php`:

```php
'cache' => [
    'pages' => true
]
```

{% hint style="info" %}
Think of `config.php` as your project's base configuration, while environment-specific files contain only the settings that differ between environments.
{% endhint %}

### Where Should I Put New Config Options?

Most code examples throughout this documentation show only the configuration snippet that needs to be added. Before copying any option, it's important to understand **where it belongs**.

While Kirby allows you to place all options directly in `site/config/config.php`, we strongly recommend using a **multi-environment setup** instead (explained above). This keeps your configuration organized, makes maintenance easier, and helps prevent your custom settings from being overwritten when following future Zero One updates.

For example, when the documentation shows:

{% code title="site/config/config.your-domain.com.php" %}

```php
return [
    'panel' => [
        'slug' => 'your-secret-login'
    ],
    
    // The rest of your config options
    
];
```

{% endcode %}

you should usually add that option to your environment-specific configuration file rather than the main `config.php`.

#### Recommended Setup

Instead of storing all configuration in:

```
site/config/config.php
```

use environment-specific files such as:

```
site/config/
├── config.localhost.php
├── config.staging.your-domain.com.php
├── config.your-domain.com.php 
└── config.www.your-domain.com.php
```

This approach keeps your project cleaner, easier to manage, and safer to update.

#### Always Place Options Inside the Return Array

Configuration options must be added inside the `return` array:

✅ Correct

{% code title="config.[www.your-domain.com.php](http://www.your-domain.com.php)" %}

```php
return [

    'panel' => [
        'slug' => 'your-secret-login'
    ],

    // Your existing config options

];
```

{% endcode %}

❌ Incorrect

{% code title="config.[www.your-domain.com.php](http://www.your-domain.com.php)" %}

```php
return [

    // Your existing config options

];

'panel' => [
    'slug' => 'your-secret-login'
];
```

{% endcode %}

#### Always Remember the Comma

Each option in the configuration array must be separated by a comma.

✅ Correct:

{% code title="site/config/config.your-domain.com.php" %}

```php
return [
    'debug' => false,

    'languages' => true,

    'panel' => [
        'slug' => 'your-secret-login'
    ],

];
```

{% endcode %}

❌ Incorrect:

{% code title="site/config/config.your-domain.com.php" %}

```php
return [

    'debug' => false

    'languages' => true,

];
```

{% endcode %}

Missing commas will result in a PHP syntax error, and your website may stop working.

***

### Debug

Debug is set to true on localhost and, of course, to false on the server.

{% hint style="danger" %}
**Important note:** When debugging is turned on, robots.txt will tell the crawlers not to index your website. So, make sure to turn off debugging mode when your website is live.
{% endhint %}

### Custom panel CSS&#x20;

There is an import for the custom panel CSS file. Zero One uses it to customize Editor user role permissions. That file is **`assets/css/panel.css`** and you can customize it further.

### Smartypants

Smartypants are on by default in Zero One. Learn more about it at <https://getkirby.com/docs/reference/system/options/smartypants>

### ~~Autoresize~~

From Zero One version 5.0.2, the Kirby Autoresize plugin is removed, and its config options. Now you can change image upload optimization settings in these files:

* `site\plugins\zero-one\blueprints\files\image.yml`
* `site\plugins\zero-one\blueprints\files\default.yml`

### Robots

There is also some settings code for [Kirby 3 Robots.txt](https://github.com/bnomei/kirby3-robots-txt) plugin from Bruno Meilick. You can add your custom rules, so check the plugin documentation.

### Hooks

There is also a little `site.update:after` hook which is needed to write CSS code from the Site Styling Custom CSS input to `assets/css/site.css`.

### Plugins

We also disallowed version info for some plugins that shouldn't have that information.

And that's it; the rest is up to you. 🙂
