Skip to content

What is a staging site?

By Ash, Founder, HosteazePublished 2 min read

A staging site is a private copy of your live website, kept at a separate address, where you test changes before real visitors see them. You update plugins, try a new theme or rebuild a page on staging, check nothing breaks, then copy the changes across. If something goes wrong, only the copy is affected.

A closed red theatre curtain above an empty wooden stage, the space where a show is prepared before the audience sees it.
Credit: Libracesp via Pixabay

Think of a staging site as the rehearsal before opening night. Your live site (developers call it "production") is what customers see. The staging site is a copy at an address like staging.yourbusiness.co.uk, where you can break things in private and nobody phones to say the contact form has vanished.

What is a staging site used for?

The everyday uses for a small business site:

If an update triggers the dreaded white screen of death, you'd much rather it happened on the copy.

Staging site vs live site vs local copy

Live (production)StagingLocal
Where it runsYour hosting serverUsually the same server, separate addressYour own computer
Who can see itEveryoneOnly you, behind a passwordOnly you
Matches the live server setupYesCloselyNot always
Good forReal visitorsFinal checks before going liveBuilding and experimenting

Staging's advantage over a local copy is that it runs on the same kind of server as your live site. A plugin that works on your laptop can still fail on the server because of a different PHP version or memory limit. Staging catches that.

How do you make a staging site?

There are three common routes:

Whichever you use, password-protect it, and set Settings > Reading > Discourage search engines from indexing this site on the staging copy. WordPress then adds a noindex tag to every page. That tag is only a request, which is why the password matters too.

What goes wrong with staging sites?

The classic mistake is copying the whole staging database back over the live one. Any orders, form entries or comments that arrived on the live site since you made the copy are wiped out. On a shop that's a bad afternoon. Copy across files, or redo settings by hand, unless your staging tool handles the merge for you.

The other is a staging copy of a shop sending real emails to real customers. Setting WP_ENVIRONMENT_TYPE to staging in wp-config.php lets well-behaved plugins know to hold back.

More plain-English guides are in Email and domains.

Frequently asked questions

Will a staging site hurt my SEO?

Only if search engines find and index it, which creates a duplicate of your site. Password-protect the staging site and tick Discourage search engines from indexing this site in its Settings, Reading screen. Never tick that box on the live site.

Do I need a staging site for a small brochure website?

It's still worth having one if you can, especially before major WordPress updates or a theme change. If you can't, take a full backup immediately before every update so you can roll back.

How do I tell WordPress a site is a staging copy?

Add define( 'WP_ENVIRONMENT_TYPE', 'staging' ); to the staging site's wp-config.php file. Since WordPress 5.5, plugins can read this and switch off things like payment processing or outgoing emails on staging.

Sources

  1. WordPress Developer Resources, wp_get_environment_type()
  2. Make WordPress Core, New wp_get_environment_type() function in WordPress 5.5
  3. WordPress.org Documentation, Settings Reading Screen
  4. Google Search Central, Block search indexing with noindex

Hosting made for WordPress

See how our WordPress hosting is set up.

See WordPress hosting