Skip to content
Blog

How to use staging and preview environments

How to use staging and preview environments on a WordPress site: what each one is for, how a change travels to live, and habits that keep them useful.

The WP Waterfall team · Guides

Every WP Waterfall site comes with a staging environment and five preview environments, and most people use one of them. This post is about how to use staging and preview environments well: what each is for, how a change travels to live, and a few habits that keep them from going stale.

What is an environment?

An environment is one copy of your site: its own database, its own uploads folder, and its own code, running in its own container on its own address. Live is the one your visitors see. Staging is a private copy where you work. A preview is a copy of staging (or of live) made for one piece of work, with a name you choose, such as qa or checkout.

Search engines and AI crawlers are kept out of staging and previews. Mail is off there too, so a test order never emails a real customer.

Live, staging, and a preview each run their own copy of the site on their own address.

What staging is for

Staging is the path to live. Every code change, whether a plugin update, a new theme, or a line of CSS, lands on staging first. You look, and then you deploy. A deploy copies the code to live and leaves live's database and uploads alone, so an afternoon of testing on staging never overwrites today's orders.

We built the daily tools around this. Automatic updates run on staging and previews, never on live, and hold back an update that breaks a page. The PHP version can be tried on staging first. When you are done testing, staging can be reset from live with one confirm, so it matches the real site again.

Our habit: treat staging as "live, tomorrow". Keep it close to live, and keep it short lived between deploys.

How to use staging and preview environments together

A preview is for work that should not block staging: a redesign that will take three weeks, a plugin you want to compare, or a client who wants to see two options. Create one from the environment switcher, name it, and pick what to clone from. It gets a Git branch with the same name, a copy of the database and uploads, and its own address. When the work is ready, merge it into staging and deploy from there.

A new preview starts as a copy of staging, with its own branch, database, and uploads.

Previews run on a small profile: 2 PHP threads, a 512 MB memory pool, and one CPU core. They share the server with live but cannot slow it. If you need a preview to behave like live for a load test, give that one preview a higher site tier. The tier applies to that environment only.

The five previews are included on every plan. More can be bought from the same dialog.

Habits that keep them useful

  • Name previews for the work, not the person. checkout-redesign means something in three months. toms-test does not.
  • Delete a preview when its work is merged. A preview that lives for months drifts from staging, and the merge gets harder each week.
  • Reset staging after a messy test. Reset staging from live puts staging's code, database, and uploads back to what live has.
  • Give clients the preview address, not staging. Staging keeps moving. A preview holds still until you say so.
  • Try risky settings on staging. A PHP version, a thread and memory balance, or a cache rule can be set per environment.

The full picture, with the deploy options, is in Staging, live, and preview environments.

What to do next

Create one preview today, give it the name of the thing you keep putting off, and start. Staging stays free for the small fixes.

Read next

Try what you just read about.

See it in your own dashboard.