A staging-first workflow means every WordPress update lands on a copy of the site first, gets tested on key pages, and only then goes to production, with a backup taken just before. It trades a little speed for far fewer broken sites.
Why staging helps
Core minor updates are automatic by default, but plugin and theme updates are your decision, and a major plugin release can change behaviour. Testing elsewhere turns a possible outage into a failed test. The documentation lists staging as a reason to disable the automatic updater: it suits sites with customisations, host-supplied updates, or a need to test first.
The workflow
- Take a fresh backup of production, database first then files.
- Copy production to staging, and scrub or restrict personal data in the copy.
- Mark the environment so code can behave differently.
- Apply the updates on staging: core, then plugins, then themes.
- Run a short test script.
- Schedule the production update in a quiet window.
- Apply the same updates, then rerun the script.
- Keep the backup until you are sure.
Use the environment type setting
WordPress supports a WP_ENVIRONMENT_TYPE constant with four values: local, development, staging and production. Unrecognised values fall back to production. Setting development also turns on debug mode if it is not defined. Setting staging on the copy lets plugins and your own code know where they are running.
define( 'WP_ENVIRONMENT_TYPE', 'staging' );
Pair it with protecting the staging site from public search engines and anonymous visitors, because a staging site is often less defended than production.
What to test
| Path | Check |
|---|---|
| Home and top pages | They load and look right |
| Login and admin | You can sign in and open the dashboard |
| Forms | A test submission arrives |
| Checkout or bookings | A test order completes |
| Media | Images and uploads display |
| Logs | No new fatal errors |
Keep this as a one page script anyone on the team can run.
Where automation fits
You can still automate low risk updates. The point is to be deliberate: define which plugins update without a test and which must go through staging. Record that list per site.
Finally, remember that a staging copy holds real data. Treat it as sensitive. If your staging builds also pull dependencies from a repository, Safeguard can scan a repository for dependency manifests and produce an SBOM, and there is a free scan at gold.safeguard.sh/scan.
Try it yourself
Click through it at your own pace, or open it full screen. See how a change is checked before it merges, the same gate idea applied to updates.
Quick check
Does staging replace a backup?
No. Keep a backup of production immediately before the release regardless of what staging showed.
What does WP_ENVIRONMENT_TYPE do?
It tells WordPress and code which environment is running. Values are local, development, staging and production.
Sources
Last reviewed: 19 October 2026.