Documentation
Feedback
Guides
Storefront Development

Storefront Development
Store Framework
Updating live stores
Migrating CMS settings after a major theme update

You may need to perform a major update of your Store Theme app due to changes in its peer dependencies. However, transitioning to a new major version of the Store Theme could result in undesired consequences, such as losing the configured Admin page template settings.

To handle this situation and ensure a smooth migration, follow the steps below to migrate template settings.

Before you begin

Ensure you have the following tools installed on your machine. They are responsible for facilitating the interactions with the VTEX platform and enhancing your development experience:

  1. Install the VTEX IO CLI.

  2. Install GraphQL IDE by running the following command:


    _10
    vtex install vtex.admin-graphql-ide@3.x

Step by step

  1. Open the terminal and log in to your account.

  2. Change to the production workspace containing your latest changes and publish a new major version of your Store Theme app.

  3. In the production workspace, install the Store Theme version published in the previous steps by running the following command:


    _10
    vtex install {appVendor}.{appName}@{appVersion}

  4. Open the VTEX Admin of the production workspace used in the previous steps and go to the GraphQL Admin IDE:


    _10
    vtex browse admin/graphql-ide

  5. From the Choose an app dropdown list, select vtex.pages-graphql@2.x.

  6. Copy the code below and paste it into the GraphQL IDE.


    _10
    mutation{
    _10
    updateThemeIds(from:"{appVendor}.{appName}@{oldMajor}.x", to:"{appVendor}.{appName}@{newMajor}.x")
    _10
    }

    Replace only the values in curly brackets with those that apply to your scenario. You must keep the x, without replacing it with the minor and patch versions. If you do that, the mutation will not work.

  7. Execute the code by clicking Execute Query (▶).

    The expected response body is


    _10
    {
    _10
    "data": {
    _10
    "updateThemeIds": true
    _10
    }
    _10
    }

  8. Go to the Storefront module within VTEX Admin and validate the content in its features, such as Site Editor, Pages and Redirects.

  9. Once you have validated your data in the Storefront module, promote your workspace to master.

Contributors
4
Photo of the contributor
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 4 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
4
Photo of the contributor
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 4 contributors
On this page