Staging: testing changes before they go live

A staging site is a copy of your live site where you can break things safely. If your site earns money or takes bookings, you should have one.

Making one

The simplest approach on our hosting is a subdomain – staging.example.com – created in cPanel, with a copy of the files and a copy of the database. Several backup and migration plugins will do the copy for you.

Three things to do to a staging site immediately

  • Stop search engines indexing it. Tick the discourage-search-engines setting. A duplicate of your whole site appearing in Google helps nobody.
  • Put it behind a password. Use cPanel's directory privacy so only you can reach it.
  • Disable anything that contacts the outside world – payment gateways in live mode, mailing list synchronisation, order emails. A staging site that emails real customers is worse than no staging site.

Using it

Apply the update, the new plugin, or the theme change there first. Click through the parts of the site that matter, including whatever handles money. Only then repeat it on the live site.

Pushing changes back

Be careful here. Copying the staging database over the live one will overwrite everything that has happened in the meantime – new orders, new comments, new customers. For anything other than a brand-new site, make the change again on live rather than copying the database back.

Keep it current or delete it

A staging site from eight months ago tests nothing. Refresh it from live before each use, and remember it counts toward your disk and inode usage.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Why WP-Cron is disabled on our servers, and what replaces it

WordPress has its own scheduling system, WP-Cron, which runs scheduled tasks – publishing...

Object caching, and why Redis is not available here

WordPress can store the results of database queries in memory so that repeated requests do not...

Moving an existing WordPress site to us

A move goes wrong in predictable ways. Doing it in this order avoids all of them. 1. Set the...

The white screen of death: how to diagnose it

A completely blank page means PHP stopped part-way through and had nothing to show. The page...

Locked out of wp-admin: how to get back in

There are several routes back in depending on what is wrong. All of them need cPanel access, so...