Swap environments

Jan Cerman, David Klement
6 minutes
Environments
0% complete
Now you have the know-how to create a new environment, and you’re confident about the purpose of your new environment. Once it’s time to turn the new environment into the new live version, it’s time for the big swap. Let’s take a good look at the necessary steps to ensure a smooth swapping process between your environments.

Before you swap

Implement a content freeze on the production environment to prevent content creators from making changes in live content, preserving content integrity during the transition. Once testing is completed in the non-production environment and considered ready, you can swap the environments by marking the non-production environment as the new production environment. Then, lift the content freeze to resume regular content production.

What happens when you swap environments?

When you mark a non-production environment as production:
  • Environment names stay the same. Make sure to rename both the new production environment and the old now non-production environment to avoid confusion after the swap.
  • Content & assets, content model, and settings of the environments stay the same. This includes all items, assets, content types, snippets, taxonomies, collections, workflows, roles, languages, preview URLs, and webhooks.
    • You can choose to have webhooks enabled or disabled after the swap.
  • Environment ID and API keys stay the same for both environments. Your apps will continue to work without interruption. However, because the environment IDs and API keys are different for each environment, you need to update them in your app after the swap so the app uses the new production environment.
  • Users and their (in)active status are carried over from the original production environment. Those active in the original production are activated in the new production. Similarly, the inactive users remain inactive.
  • Users that exist ONLY in the original production environment will NOT appear in the new production environment after the swap.

Swap environments

Once you’ve made your final changes and with the content freeze in place, you can do the swap. You swap environments by marking a non-production environment as production.
Mark an environment as production to swap with the current production environment

Swapping environments in practice

Imagine a project with two environments, Live and UAT (User Acceptance Testing). Live is used for production purposes, whereas UAT is your recently cloned environment with a modified content model.
When you mark the UAT environment as production, the contents and settings of the Live and UAT environments stay the same. Make sure to rename the environments after the swap to avoid confusion.
Sign in with your Kontent.ai credentials or sign up for free to unlock the full lesson, track your progress, and access exclusive expert insights and tips!