Everyone agrees you should test updates on a staging site before you touch the live one. Fewer people talk about the other side. A staging site is a full copy of your business, with real customer emails, real payment settings and real scheduled tasks. Set it up carelessly, and the copy can send emails, charge cards and even delete orders on your live site.
This guide starts with what goes wrong, because that is what most staging guides leave out. Then it shows a safe way to set up a WordPress staging site, test on it and move your changes to the live site.
Who Uses Staging and How They Move Changes
A survey by Crocoblock, published in October, asked 382 WordPress professionals how they build and look after sites. The answers show that staging is now normal practice, but the step after testing is still mostly done by hand.
| How WordPress professionals work | Share |
|---|---|
| Test changes in a hosting staging site before going live | 71% |
| Move changes to the live site by uploading files by hand | 38% |
| Use Git to manage changes | 19% |
| Use automatic deployment pipelines | 4% |
Most of the people in the survey were customers of Crocoblock's own tools, so it is not a picture of every site owner. But it matches what we see. Many teams test carefully on staging, then copy the result to the live site in a way that can still go wrong.
WordPress itself now says this clearly. When WordPress 7.0 came out in May, the official testing team advised site owners not to update a live site straight away if it has custom code, many plugins or a store. Their advice was to ask the host for a staging copy and test normal daily tasks first, such as checkout, publishing and media uploads.
What Can Go Wrong on a Staging Site
In October, the WooCommerce site Business Bloomer described real staging mistakes made by store owners and developers. Every one of them happened because the copy was still connected to the real world. These are the most common ones.
- Customers got emails from the copy. A developer tested an order status on staging, and a real customer received a "your order has been refunded" email for an order they never asked to refund. In another case, a newsletter that had already gone out from the live site went out a second time from staging.
- Real cards were charged. The staging copy still had the live payment keys, so a "test" order took real money.
- Subscriptions stopped renewing. Someone deleted old subscriptions on staging to clean up, and the payment plugin told Stripe to remove the customers' saved cards. Renewals on the live site failed the next day.
- Tasks ran twice. Scheduled tasks like follow-up emails, product imports and backups ran on both sites, so customers got two messages and backup folders filled with duplicates.
- Google found the copy. Staging pages appeared in search results next to the live pages, and AI crawlers could read the full copy, including product data.
- Orders disappeared. The developer pushed the staging database to the live site, which replaced all newer live data with the older copy. Orders, customers, reviews and form entries from those days were gone.
None of these needs a hacker or a bug. Each one is a normal setting that was copied from the live site and never turned off.
Want staging without the risk? Our WordPress maintenance plans test every update on a safe staging copy first, with emails, payments and scheduled tasks turned off, and only then update your live site.
How to Set Up a Staging Site Safely
The WordPress Hosting Team published new staging guidance at the end of October, and it matches the mistakes above almost one by one. The steps below follow that guidance, written for site owners rather than hosts.
- Create the copy with your host if you can. Most managed hosts and many shared hosts have a staging button in the control panel. It copies the files and database and usually changes the web address for you. If your host has no staging tool, a plugin such as WP Staging can make a copy in a subfolder.
- Tell WordPress it is a staging site. Add the line shown below to wp-config.php on the copy. Some plugins read this setting and turn off live features on their own. Make sure this line never gets copied back to the live site.
- Lock the copy with a password. The "Discourage search engines" box in WordPress is only a request, and not every crawler follows it. A password on the whole site, which most hosts can add in a few clicks, keeps out Google, AI crawlers and curious visitors.
- Stop real emails. Turn off outgoing email on staging, or use a plugin that catches emails and shows them in the dashboard instead of sending them.
- Switch payments to test mode. Change Stripe, PayPal and other payment plugins to their sandbox or test keys before you place any order on the copy.
- Turn off scheduled tasks. Stop WP-Cron on the copy so automations like reminder emails, imports and backups do not run twice. The second line below does this.
define( 'WP_ENVIRONMENT_TYPE', 'staging' );
define( 'DISABLE_WP_CRON', true );
If you also run a store with subscriptions, check the subscription plugin's settings on the copy. WooCommerce Subscriptions, for example, notices when it is running on a different web address and turns off automatic renewals there, but other plugins may not.
How to Move Changes to the Live Site
Testing is only half the job. The safest rule is to move files, not the database, whenever you can. Plugin updates, theme changes and new code are all files, so you can repeat the same updates on the live site or push only the themes and plugins folders.
Pushing the whole staging database is the step that loses orders, comments and new users, because the copy does not know what happened on the live site after it was made. If you must push the database, for example after a large redesign, choose a quiet time, put the store in maintenance mode for a few minutes and take a fresh backup of the live site first. Our WordPress backup guide explains how to make a backup you can really restore.
For normal monthly updates, a simple routine works well. Refresh the staging copy from the live site, run the updates there, click through checkout, forms and key pages, then repeat the same updates on the live site and check it again. Our guide to updating WordPress safely shows that routine step by step.
Staging is also the right place for bigger jobs. Use it to test a PHP version upgrade, to find the plugin behind a memory exhausted error or to build a new design before launch. If you are planning a full redesign, our WordPress website design team builds the new site on staging and moves it live without losing a single order. And if you run an agency, our white-label WordPress maintenance service handles staging and updates for your clients under your own brand.
