Switching Environment Flags - Change default environment

Hey Forest,

My question is regarding switching 2 environments. When we were deploying Forest for the first time we deployed our staging env which Forest recognizes as our production. We later on deployed our production env which is recognized as an intermediary environment. We now want to switch these 2 without losing all our layout changes. I wanted to ask if switching these 2 variables is enough and if it will preserve the respective layouts.

Thank you in advance! :grinning_face_with_smiling_eyes:

Hello @Arda_Yurdakul,

Thanks for your message.

It’s a bit tricky to correct the situation here, as the 1st environment you created (named today Staging) will stay the reference environment anyway.

We intend to make this process much simpler in the future.
But for now, you need to:

  • Rename your Production environment to Staging 2, and your Staging environment to Production (on the project settings of the Forest Admin interface)
  • Switch the Admin backend URL between the 2 environments (on the project settings of the Forest Admin interface)
  • Switch the environment secrets (on your admin backends)
  • Rename Staging 2 to Staging

And everything should end as you wish.

Let me know!

1 Like

Hi @adriguy,

It worked perfectly, thank you so much! :100:

1 Like

Hi, so my understanding is that even though the name has switched “Staging” will still be the default