# How to copy layout from prod to stg environments

**URL:** <https://community.forestadmin.com/t/how-to-copy-layout-from-prod-to-stg-environments/8318>\
**Category:** Help me!\
**Created:** [September 12, 2025, 8:34am UTC](https://community.forestadmin.com/t/how-to-copy-layout-from-prod-to-stg-environments/8318 "2025-09-12T08:34:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matteo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/matteo/32/75_2.png) [@Matteo](https://community.forestadmin.com/u/Matteo)\
**Post date:** [September 12, 2025, 8:34am UTC](https://community.forestadmin.com/t/how-to-copy-layout-from-prod-to-stg-environments/8318/1 "2025-09-12T08:34:39Z")

</div>

Hello everybody,

We’ve recently made a number of changes in the production environment, and now I’d like to copy the current production layout to another (remote) environment — specifically, the Staging one.

I understand this is related to the [development workflow](https://docs.forestadmin.com/developer-guide-agents-nodejs/deploying-to-production/development-workflow) and the [forest CLI](https://docs.forestadmin.com/developer-guide-agents-nodejs/deploying-to-production/forest-cli-commands), but even after going through the docs and the CLI help, I still can’t tell how this is meant to be done.

Previously, the forest CLI used to have `forest environments:copy-layout`, which, as far as I understand, has been deprecated/removed.

Could you please advise on the recommended way to bring the production layout over to the staging remote environment?

Thank you in advance,  
Matteo

PS: this is our environments starting point:

 ![Screenshot_2025-09-12_at_10_46_19](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/1/1c2e830db3bd52278488c94f5e587864ed8d3905.png)

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [September 12, 2025, 9:20am UTC](https://community.forestadmin.com/t/how-to-copy-layout-from-prod-to-stg-environments/8318/2 "2025-09-12T09:20:54Z")

</div>

Hi @Matteo 👋  
The development workflow is here for that. If you made any change on the production environment (the reference one) all child environment should take these changes.

If not, there is an issue or a change inside child env who “revert” the change you made on the production.  
To be clear, a child env is build from the production + changes applied on the child env.

Let me know if that clear 🙏

---

<div class="post-metadata">

**Author:** ![Matteo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/matteo/32/75_2.png) [@Matteo](https://community.forestadmin.com/u/Matteo)\
**Post date:** [September 12, 2025, 9:46am UTC](https://community.forestadmin.com/t/how-to-copy-layout-from-prod-to-stg-environments/8318/3 "2025-09-12T09:46:20Z")

</div>

Thank you @Arnaud_Moncel

I understand.  
I’m not sure I can rule out that there’s some issue. But for sure, the layout of the STG environment (which is based on prod) has received changes.

What I’d like is a simple outcome… I’d like to overwrite everything (about layout) in STG with the prod layout.  
It should be kept in mind that STG has some features (a few smart actions and some changes in the collection configurations) that are not present in prod.

How can we proceed?  
Should we do a [reset with the cli](https://docs.forestadmin.com/developer-guide-agents-nodejs/deploying-to-production/forest-cli-commands/environments-reset) of the stg environment then?

Thanks in advance.  
Matteo

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [September 12, 2025, 10:01am UTC](https://community.forestadmin.com/t/how-to-copy-layout-from-prod-to-stg-environments/8318/4 "2025-09-12T10:01:00Z")

</div>

Yes exactly the reset command should remove all the layout change you made on this environment.  
And make your two environment identical.

What do you mean by `some changes in the collection configurations`, do you want to keep them?

---

<div class="post-metadata">

**Author:** ![Matteo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/matteo/32/75_2.png) [@Matteo](https://community.forestadmin.com/u/Matteo)\
**Post date:** [September 12, 2025, 10:08am UTC](https://community.forestadmin.com/t/how-to-copy-layout-from-prod-to-stg-environments/8318/5 "2025-09-12T10:08:54Z")

</div>

Ok, got it.

> What do you mean by `some changes in the collection configurations` , do you want to keep them?

I mean to say that _in our codebase_ we have (for example) added fields to some collections, because in our DB models we have also added fields there. So the Forest schema has changed. We might also have added some smart actions that we haven’t released to prod yet, but are already on staging.

I imagine that the reset doesn’t create problems and that when Forest restarts on your side after the reset, it behaves exactly like when these changes are released in our codebase for the first time. Correct?

---

<div class="post-metadata">

**Author:** ![Matteo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/matteo/32/75_2.png) [@Matteo](https://community.forestadmin.com/u/Matteo)\
**Post date:** [September 12, 2025, 10:16am UTC](https://community.forestadmin.com/t/how-to-copy-layout-from-prod-to-stg-environments/8318/6 "2025-09-12T10:16:56Z")

</div>

I just had a try:

`npx forest environments:reset -e [my stg enviroment name]`

…and I got the expected outcome.  
And I also confirm that forest behaves exactly as if I had just released to staging (in my codebase) the changes that differentiate this environment from prod.

Perfect. 👌

Thank you for your support.  
Matteo

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [September 12, 2025, 12:11pm UTC](https://community.forestadmin.com/t/how-to-copy-layout-from-prod-to-stg-environments/8318/7 "2025-09-12T12:11:47Z")

</div>

Yes exactly we keep all things coming from your agent.  
Nice to hear that you’re welcome.
