Build
How to set up a staging site
Create a copy of the site on a separate subdomain or local environment, block it from search with both a noindex tag and password protection, and make it the only place changes are tested. The critical step is removing that noindex when it becomes production.
Before you start
- Hosting that supports a second environment, or a local setup
The steps
-
Step 1: Create the environment
A subdomain, a separate hosting account, or a local copy. Any of the three works.
-
Step 2: Copy files and database
A recent production snapshot, so you are testing against realistic data.
-
Step 3: Block it from search
A noindex meta tag and HTTP authentication. Use both — either alone has failed for someone.
-
Step 4: Anonymise real customer data
If the database contains orders or personal data, scramble it. A staging copy is a second place it can leak from.
-
Step 5: Disable outbound email
So test orders do not send real confirmations to real customers.
-
Step 6: Document the promotion process
Exactly what has to change when staging content becomes production — starting with the noindex.
-
Step 7: Test the process once
Push a trivial change through staging to production and confirm every step works.
The two opposite failures
A staging site left crawlable competes with production in search and leaks unfinished work. A noindex carried into production removes the whole site from the index silently. Both are common, and the second is far more expensive.
Staging is not optional if updates happen
It does not have to be permanent — a local copy or a temporary subdomain is enough. What matters is that the first place a plugin update is applied is not the site currently taking orders.
The background behind this
Website maintenance: the routine that prevents silent failure covers the reasoning in about 4 minutes — free, ungated, written from client work.
Who wrote this
Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada, Ireland and Pakistan. These procedures are the ones I run on client work, written down rather than invented — including the ones where the honest answer is that the fix is not available on your current hosting.