Level 50
Hi @twg_
You just edit .env directly in Forge site settings. Since it is ignored in your git it will not be overwritten or changed on each commit. This is how most people do it.
Hope it helps!
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I'm using forge to push out my first project. When I push to my repo of course the .env file is left out since it's my production .env file. What's the best way to push changes and have a production env file?
Hi @twg_
You just edit .env directly in Forge site settings. Since it is ignored in your git it will not be overwritten or changed on each commit. This is how most people do it.
Hope it helps!
Please or to participate in this conversation.