Test changes on staging, then promote
Staging is a second copy of your site where you try changes before your visitors see them. It has its own address, its own versions and its own environment variables. When a version looks right, you promote it to production in one click.
Staging is included on every plan, including the free Launch plan. Each site can have one.
Add staging
Section titled “Add staging”-
Open your site in Sites & Apps and click the Staging tab.
-
Click Add staging.
Your staging lives at staging--yourname.cloudzyro.app, where yourname is your site’s address. It’s hidden from search engines, so it never competes with your real site in Google. Anyone with the link can still open it.
Open it from your site’s Staging tab with Open staging. It has the same tabs as any site, such as Versions, Domains, Usage, Environment variables and Settings, and a banner at the top that says it’s staging and links back to your site.
Add staging’s environment variables
Section titled “Add staging’s environment variables”Staging starts with no environment variables of its own. Open staging, then its Environment variables tab, and add what it needs. This is the place for test keys, such as Stripe’s test mode keys or a separate test database, so testing never touches real customers or real payments.
See Set environment variables.
Put a version on staging
Section titled “Put a version on staging”Deploy to staging the same ways you deploy any site:
- Upload: open staging and add your files, as in Upload your files.
- Git: in staging’s Settings, connect the same repository as your site and choose a branch for staging, such as
staging. Every push to that branch goes to staging, and pushes to your main branch still go to your site. See Deploy from Git. - Your AI tool: ask it to deploy to
staging--yourname, using the full staging name.
Staging keeps its own versions, so you can restore an earlier staging version without touching production.
Promote to production
Section titled “Promote to production”-
Check staging at its address until you’re happy with it.
-
Click Promote to production, on your site’s Staging tab or on the banner in staging.
-
Click Yes, promote.
Promote takes the exact files of staging’s live version and builds them again for production, with production’s environment variables. That matters for anything your app builds into its pages, such as keys that start with NEXT_PUBLIC_: production gets its own values, never staging’s.
The new version goes through the same checks as any deploy. It only replaces your live site once it has started and answered, so a problem in the build never takes your site down. It shows in your site’s versions as “Promoted from staging”, and you can restore the previous version in one click, as with any version.
Delete staging
Section titled “Delete staging”On your site’s Staging tab, click Delete staging, then Yes, delete staging. This removes staging, its versions and its address. Your site isn’t affected. Deleting your site deletes its staging too.
Limits and usage
Section titled “Limits and usage”Staging runs with the Launch plan’s limits, whichever plan your site is on, and has its own traffic allowance. It’s for checking changes, not for real visitors. See Usage and limits.