How to Create a Staging Site
WordPress & Managed Editor
Disclosure: Some links on this page are affiliate links — if you sign up through one, we may earn a commission at no extra cost to you. It never changes our ratings, rankings or verdicts: we don't sell hosting and take no pay-for-placement.
Who it's for
- WordPress site owners
- Developers testing updates
- Agencies managing client sites
What a Staging Site Is
A staging site is a private, separate copy of a live website, used to test changes such as theme updates, plugin installs, code edits, and redesigns before they reach the public version. It typically lives on a subdomain like staging.example.com, or on a temporary URL the host provides, with its own copy of the files and database. Nothing you do there changes what visitors see. See staging environments in hosting for how this fits among other hosting features.
The value is simple: a mistake on staging costs you nothing, while the same mistake on a live site costs you visitors, sales, and sometimes search rankings. The catch is that staging is only as good as its faithfulness to the real site. A copy that’s three weeks old, or that has different PHP settings, can pass every test and still fail when you go live.
Prerequisites Before Creating a Staging Site
- A live site already running, since staging is a copy of an existing site rather than a starting point for a new one.
- A hosting plan with a staging tool, if using the one-click route. This is common on managed hosting and WordPress hosting plans.
- Enough storage and resource headroom to run two copies side by side. Staging duplicates your files and database, so a 5 GB site needs roughly another 5 GB. Check your resource limits before you start.
- A fresh backup of the live site. You’ll need it if a push to live goes wrong, and making it takes a minute. See how to backup a website.
How to Create Staging Site: Step-by-Step
Launch the Built-In Staging Tool or Create a Subdomain Manually
- Check the hosting panel for a built-in staging tool. It’s often labeled Staging or Create Staging Site, and on managed and WordPress-specific plans it’s typically one click. Some hosts put it in the main dashboard, and others put it inside a WordPress plugin they install for you. Some panels also offer a choice of what to copy, such as files only, database only, or both. For a first clone, choose both.
- Launch the clone. The tool copies the live site’s files and database to an isolated environment and gives you a separate address. Expect it to take anywhere from under a minute to several minutes, depending on site size. It should also rewrite the site address inside the copied database so the clone doesn’t redirect visitors back to the live domain.
- If there’s no built-in tool, build it by hand. This is the more involved route, but it’s very doable on standard shared hosting:
- Create a subdomain such as
staging.example.com. - Copy the live site’s files into the subdomain’s folder, using File Manager or FTP.
- Create a brand new, empty database and user in cPanel.
- Export the live database with phpMyAdmin and import it into the new one.
- Edit the staging copy’s configuration file (
wp-config.phpon WordPress) so it uses the new database name, user, and password, never the live ones. - Update the site address stored in the database to the staging URL. On WordPress, that means changing the siteurl and home values, and a search-and-replace tool or plugin is safer than editing them by hand because some settings store the address in serialized form.
- Create a subdomain such as
Doing this once manually teaches you how the pieces fit, but it’s slow enough that you’ll want a plugin or a host tool if you stage regularly.
Password-Protect Staging, Then Push Changes Live
- Lock the staging site down before you do anything else. Add password protection through the panel (cPanel has a Directory Privacy tool) or through your host’s staging settings. Also set the site to discourage search engines. Password protection is the stronger of the two, because a noindex setting is only a request, and a copy of your site indexed under a second URL creates duplicate content you then have to clean up.
- Make and test your changes on staging only. Update the theme, install the plugin, or restructure the pages. Then test the things that make you money: the contact form, checkout, login, and key landing pages. Email-sending features often behave differently on staging, and some hosts disable outgoing mail there on purpose, so a test order that sends no confirmation isn’t necessarily a fault.
- Decide how you’ll move the changes live. This is the decision that matters most, and it depends on what you changed:
- If you changed only code, such as a theme or plugin update, pushing files alone is safe.
- If you changed content or settings, you’ll need the database to move too.
- If the live site takes orders, comments, or sign-ups, pushing the staging database over it will erase everything that happened on the live site since you cloned it.
- Push to live. Most tools have a Push to Live or Deploy button. Read the options carefully before you confirm, and take a fresh backup of the live site first. Manual setups mean re-uploading files and, if needed, importing the database back to production.
The Gotcha That Costs People Real Data
The most damaging staging mistake is overwriting live data. Imagine you clone on Monday, spend the week testing a redesign, and push everything live on Friday. If customers placed orders or left comments during the week, a full database push replaces the live database with Monday’s version, and those orders are gone.
There are three sensible ways around it. First, for content-heavy or transactional sites, push files only, and recreate small setting changes on live by hand. Second, use a tool that offers selective database pushes, such as choosing specific tables. Third, keep the staging window short and freeze content and orders on live while you work. Whichever you choose, the live backup you took before pushing is your safety net. Hosts vary widely here, and the simplest one-click tools are often the ones that give you the least control over this exact step. It’s worth reading how your host handles it before you rely on it.
Verifying the Staging Site Works
Load the staging URL directly and confirm it’s a functioning, separate copy, not an empty install. Then make a small, reversible change, such as editing a headline, and confirm it appears only on staging and not on the live domain. Log in to the staging admin and check the site address setting to confirm it shows the staging URL.
Before pushing anything live, double-check that staging is isolated. Some manual setups accidentally share a database with production, which defeats the purpose entirely. The fastest check is to compare the database name in the staging configuration with the live one. They should be different.
Common Errors When Creating a Staging Site
- Staging is publicly indexed by search engines. The protection step was skipped. Add a password, turn on the noindex setting, and request removal of the URLs in Google Search Console if they’ve appeared.
- Staging links point back to the live site. The site address in the database wasn’t updated, so clicking a menu item sends you to production. Fix the address and run a search-and-replace on stored URLs.
- Changes made on staging don’t appear after pushing live. The push may have copied only files or only the database. Also clear any caching at the host or in a plugin.
- Staging shares data with production by accident. A manual setup pointed the staging install at the live database. Edits on staging then change the live site. Stop, fix the configuration, and restore from backup if needed.
- The staging URL returns a 404 or DNS error. The subdomain wasn’t created or hasn’t finished resolving, or the document root points at an empty folder.
- Staging has no SSL padlock. Subdomains aren’t always covered by the main certificate. See how to install an SSL certificate.
- Staging is slower or times out. It’s running on the same account’s resources, so a large clone can push a small plan toward its limits.
Staging vs Backups
Staging and backups solve related but different problems. A backup is a point-in-time snapshot to restore from if something breaks, while staging is an editable environment to test changes safely before they reach production. Neither replaces the other. A solid workflow uses staging to test and a fresh backup as the fallback if a live push still goes wrong.
When Hosts Make It Easier or Harder
Managed WordPress hosts tend to make staging easiest, with one click to create and one click to push, often with clear choices about files and database. Shared hosting generally gives you no built-in tool, so you’ll either do the manual method above or use a WordPress staging plugin. The plugin route is convenient, but it runs inside the site it’s copying, so a large site or a low-resource plan can cause timeouts. If you update plugins often, or run a store, a host with real staging is worth paying a little extra for. If you update twice a year, the manual method is fine.
FAQ
Do I need a staging site for small content edits? No. Staging is generally reserved for changes with real risk, such as theme updates, plugin installs, and structural changes. Routine text or image edits are usually safe to make directly.
Will visitors see my staging site? Not if it’s properly password-protected. Without that step, a staging subdomain is technically reachable by anyone who finds the URL, even if it isn’t linked from the live site.
Can I have more than one staging site? Some hosting plans allow several staging environments, which is useful for testing changes in parallel. Others limit it to one. Check the plan’s staging tool for its specific limit.
What happens to staging after I push changes live? The staging copy typically remains in place, ready for the next round of testing. Keep in mind it’s now out of date relative to live, so refresh it from live before starting new work.
Is staging worth it for a simple brochure site? Often not every time, but it earns its place before major updates, such as a new theme or a PHP version change.