# Update your theme

You will be notified of all theme updates in your **Theme library**. Click the notification to view the update details.

* Click **View release notes** to learn more about the update.
* Click **Add to theme library** to add an unpublished copy.

{% columns %}
{% column %}
**Automated updates**

Themes automatically update for minor fixes or security issues. Any customizations made using the theme editor will be included. [Learn more](https://help.shopify.com/en/manual/online-store/themes/managing-themes/updating-themes)
{% endcolumn %}

{% column %}
**Manual update required**

If you or an app has made any custom code changes, you will need to manually transfer theme files.
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
Our Support cannot cover manual theme updates, code customizations, or app integration.
{% endhint %}

## Manually updating your theme

***

If your theme does not automatically update, or if there are any code changes made to your theme copy, you will need to copy any updated files from your current copy to the new theme version.

The following guide shows how to transfer your theme settings and templates faster and efficiently.

### Step 1: Add updated theme version

***

First, you will need to add the latest theme version before transferring your settings and templates.

In your **Shopify Admin**:

1. Click **Add to theme library** to add the updated version of the theme to your theme library. The updated theme copy will have the theme name prefixed with "Updated copy of".
2. If there's no **Add to theme library** button, you may need to install a fresh copy of Cornerstone from the theme store.

{% hint style="info" %}
**Recommended**

Add a duplicate copy of your current theme as a backup. You can rename theme copies to keep track of different versions.
{% endhint %}

### Step 2: Open code editors for both themes

***

Open the code editors for each theme copy in separate windows. This will make it easier to copy and paste code to the new theme version.

<figure><img src="https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2FMQ1fe4jBfjfeMXKFcXiF%2Fcode-editor-windows.png?alt=media&#x26;token=d2417005-54b5-420c-bad3-c74a6917dd73" alt=""><figcaption></figcaption></figure>

### Step 3: Open theme files

***

Get ready to transfer your code by opening theme files for both the current and new theme version. You will need to open files for theme settings, templates, section groups, and other files with custom code.

**Note**: This includes files that have been created for [customized Contexts](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/store-contextualization).

<div><figure><img src="https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2FzgSevdSJjMZG3zLArojh%2Fcode-editor-templates-new.png?alt=media&#x26;token=17540db8-4857-484b-825c-effa88cf6cdd" alt=""><figcaption></figcaption></figure> <figure><img src="https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2FzEF8wJsZ0XWxA3qHVy0U%2Fcode-editor-config-new.png?alt=media&#x26;token=b72a4e69-04a4-4447-bd76-2d87fad9f382" alt=""><figcaption></figcaption></figure></div>

<details>

<summary><mark style="color:blue;"><strong>STEPS</strong></mark></summary>

First open files in the old theme version, then repeat these steps for the new version.

1. Open the **Templates** folder.
2. Click every **`.json`** file in the order they appear to open them in their own tab.
3. In the **Sections** folder, open files for the header, footer, and overlay sections.

   > * **`header-group.json`**
   > * **`footer-group.json`**
   > * **`overlay-group.json`**

   > You will also need to open any files created for [custom Contexts](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/store-contextualization). For example:
   >
   > * **`header-group.context.eu.json`**
   > * **`footer-group.context.ca.json`**
4. In the **Config** folder, click to open the **`settings_data.json`**. This file contains the theme's global settings.

</details>

### Step 4: Add missing templates or files

***

If there are files that are in the old theme that don't exist in the new theme, you will need to add files with the exact same name.

**Note**: This includes files that have been created for [customized Contexts](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/store-contextualization).

<details>

<summary><mark style="color:blue;"><strong>STEPS</strong></mark></summary>

For templates or files that don't already exist in the new theme, you need to create them in the code editor.

1. Click the **Templates** folder or other folder.
2. Click the **Add file** button.
3. Enter the exact same name as the file in the old theme, including the file type. Eg. `page.landing.json`

You now should have your theme files opened and ready for each theme version.

</details>

### Step 5: Copy old theme files into new theme files

***

We will now copy and paste your old theme files into your new theme files.

<details>

<summary><mark style="color:blue;"><strong>STEPS</strong></mark></summary>

1. In both windows, select the first tab with the same filename (eg. **`blog.json`**)
2. In the old theme (left window), **select all** of the file contents (**`cmd+a`** or **`ctrl+a`**) and **copy** (**`cmd+c`** or **`ctrl+c`**) the contents to your clipboard.
3. In the new theme (right window), **delete** the current code, and **paste** (**`cmd+v`** or **`ctrl+v`**) everything from your old theme.
4. Click **Save** after overwriting each file.
5. Repeat this process for all open files. To keep track, you can close each tab once you've transferred and saved the new contents.
6. Click **Save**.

</details>

That's it! Well done! Now you can close the code editors, and preview the old and new themes beside each other before publishing the new theme.

***

> **Related links**
>
> [Shopify theme updates manual](https://help.shopify.com/en/manual/online-store/themes/managing-themes/updating-themes)\
> [Cornerstone changelog](https://help.fluorescent.co/cornerstone/readme/changelog)
