> For the complete documentation index, see [llms.txt](https://themedocs.zenit.design/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://themedocs.zenit.design/en/tutorials/child-theme-update.md).

# Child-Theme Update

## Why update a child theme?

{% hint style="success" %}
With the introduction of [`configInheritance`](https://developer.shopware.com/docs/guides/plugins/themes/add-theme-inheritance#configinheritance-section) in Shopware 6.4.8.0, Shopware has solved the inheritance of theme configurations. Child theme updates are therefore usually **no longer necessary**.

You should therefore check if your child theme is already in version 2.11.0. If you are using an older child theme, please update to this or a higher version. After that, no further child theme updates are necessary.
{% endhint %}

Occasionally, we may make our provided child themes available in a new version in addition to the main theme offered in the store.

These updates are usually **optional** and includes, for example, new configuration fields. We always make sure that our themes are compatible with older child themes. ~~If a child theme update is not performed only the new theme configuration settings are not available and you do not have access to the new feature.~~ From Shopware 6.4.8.0 the new configurations will be available due to the config inheritance.

## How to update a child theme

{% hint style="info" %}
Before you start the update, please note that for child themes with individual programming on file level the second update option has to be performed.
{% endhint %}

<details>

<summary>Without individual programming - 3 steps (effort: 3 min)</summary>

These instructions are aimed at child themes that have not been customized by individual programming at file level.

{% stepper %}
{% step %}

## Step 1

[Download](https://www.zenit.design/?lang=en#demos) the latest version of our child themes.
{% endstep %}

{% step %}

## Step 2

In the administration of the shop under *Extensions > My extensions* you can upload the downloaded zip file using the **Upload extension button**.
{% endstep %}

{% step %}

## Step 3

You then have the option to update the extension and you can update as usual by clicking on "Update".
{% endstep %}
{% endstepper %}

</details>

or

<details>

<summary>With individual programming - 4 steps (effort: 5 min)</summary>

These instructions are aimed at child themes that have been customized through individual programming at file level.

{% stepper %}
{% step %}

## Step 1

[Download](https://www.zenit.design/?lang=en#demos) the latest version of our child themes.
{% endstep %}

{% step %}

## Step 2

Unzip the child theme zip file to your computer.

Do not upload the child theme zip file through the administration. The entire plugin folder would be replaced and your code-level customizations removed.

Only the `src/Resources/theme.json` and the `composer.json` contain the content important for the update.
{% endstep %}

{% step %}

## Step 3

Exchange theme.json and composer.json on the server:

Copy the `zenitPlatform[THEMENAME]Set[NUMBER]/src/Resources/theme.json` from the unzipped zip file an overwrite the version on your server under `/custom/plugins/zenitPlatform[THEMENAME]Set[ NUMBER]/src/Resources/theme.json`

Copy the `zenitPlatform[THEMENAME]Set[NUMMER]/composer.json` from the unzipped zip file an overwrite the version on your server under `<shopware root>/custom/plugins/zenitPlatform[THEMENAME]Set[NUMMER]/composer.json`
{% endstep %}

{% step %}

## Step 4

You then have the option to update the extension in the administration and you can update as usual by clicking on Update.
{% endstep %}
{% endstepper %}

</details>

## What's in a child theme?

Only the `src/Resources/theme.json` and the `composer.json` contain relevant content that is important for the update:

```
# move into your theme folder
$ cd <shopware root>/custom/plugins/zenitPlatform[THEMENAME]Set[NUMMER]

# structure of theme
├── composer.json  <-------------------- INCREASED VERSION NUMBER!
└── src
    ├── zenitPlatformStratusSet1.php
    └── Resources
        ├── app
        │   └── storefront
        │       ├── dist
        │       │   └── assets
        │       │   └── storefront
        │       │       └── js
        │       │           └── zenit-platform-stratus-set1.js
        │       └── src
        │           └── scss
        │               ├── base.scss
        │               └── overrides.scss
        └── theme.json  <-------------------- NEW CONFIGURATIONS!
```

**composer.json** - Contains only as a change the new version number, so that in the administration the update can be performed.

**theme.json** - Contains the theme configuration of the child theme.

**All other files** in the child theme like the base.css, overrides.scss and javascript files must be in a child theme for it to be installed and assigned. These files are basically empty and do not contain any relevant content and will never receive any content by us.
