How to Create a WordPress Staging Site (4 Ways, Step by Step)
A staging site is a private copy of your live site where you can test updates, plugins and redesigns before visitors see them. Here are the four ways to make one, how to push changes back safely, and what to watch on a WooCommerce store.
In this article
- 01The short answer
- 02What a staging site is, and when you need one
- 03Method 1: Use your host's one-click staging
- 04Method 2: Use a staging plugin
- 05Method 3: Create a staging site by hand
- 06Method 4: Stage on your own computer
- 07How to push staging changes to the live site
- 08What to test on staging before you push
- 09Common staging problems, and the fixes
- 10Keep your staging site private
- 11Where WPOS fits
Key takeaways
- A staging site is a private copy of your live site for testing updates, plugins and design changes before visitors see them.
- The quickest route is your host's staging tool: WordPress.com has it on Business and Commerce plans, GoDaddy on every Managed WordPress plan except Basic.
- Without host staging, WP Staging (100,000+ installs) clones your site into a subfolder of the same hosting in a few clicks.
- Pushing staging over live replaces the live database, so a store can lose orders placed in the meantime; copy changes across or pause orders first.
- Keep staging out of search results: WordPress.com hides it automatically; elsewhere, discourage indexing and add a password.
The short answer
- On managed hosting: use your host’s staging tool, which is usually one click.
- On any host: install a cloning plugin such as WP Staging and create the copy from wp-admin.
- By hand: copy the files and the database to a subdomain, then replace the live address in the database.
- On your computer: build locally with WordPress Studio or WordPress Playground, then move the result.
- Before anything goes back to the live site, take a backup, and on a store, never overwrite orders placed since you made the copy.
What a staging site is, and when you need one
A staging site is a private copy of your live (production) site on its own address: a staging environment where you can test changes without affecting the live website or its visitors. WordPress.com describes it as the place to test “significant theme and plugin updates, incompatibilities, or any other major changes” before you apply them to the live site.
Use one before:
- Major updates: WordPress itself, a new PHP version, your page builder or WooCommerce.
- New plugins that touch checkout, forms, caching or security.
- Redesigns, new templates and theme switches.
- Custom code: snippets, child theme changes and new widgets.
For a typo or a new blog post, staging is overkill: edit the live site, with a recent backup in place.
Method 1: Use your host's one-click staging
Most managed WordPress hosts build staging in. One button copies the site to a private address, and another pushes changes back. From the hosts’ own documentation:
| Host | Staging | What to know |
|---|---|---|
| WordPress.com | Business and Commerce plans | One staging site per site, on an address starting with staging-; always hidden from search engines; syncs in both directions |
| GoDaddy Managed WordPress | Every plan except Basic | Create staging, pull production into staging, push staging into production |
| DreamHost | Built into DreamPress | On Shared, VPS and Dedicated hosting you make the copy yourself on a dreamhosters.com subdomain |
On WordPress.com, open your site, click the Production drop-down under the site title and choose “+ Add staging site”. The copy carries your posts, pages, themes, plugins, media, users, settings and the rest of the database, and WordPress.com adds WP_ENVIRONMENT_TYPE=staging to wp-config.php so plugins know where they are. Staging and production share your storage half and half.
Many other managed hosts have the same kind of tool; look for Staging in your hosting dashboard.
Method 2: Use a staging plugin
If your host has no staging tool, a plugin can make the copy from wp-admin. WP Staging (100,000+ active installs, 4.8 out of 5 on WordPress.org) clones the whole site into a subfolder such as example.com/staging-site, on the same hosting, so there’s nothing extra to buy. It replaces the links and paths for you, and only administrators can open the copy, which is kept out of search results.
- Install and activate WP Staging from Plugins, Add New.
- Open WP Staging and choose to create a new staging site.
- Pick the database tables and folders to copy (all of them, for a true copy) and start the clone.
- Open the staging site from the link WP Staging shows. Its admin bar turns orange, so you always know which copy you’re in.
Pushing staging changes back to the live site with one click, or cloning to a separate subdomain such as dev.example.com, is in WP Staging Pro. For copies to another server, Duplicator (1,000,000+) and All-in-One WP Migration (5,000,000+) package the site so you can move it.
Method 3: Create a staging site by hand
This works on any host and is what DreamHost describes for its shared plans. You’ll need access to your hosting panel and, ideally, WP-CLI.
- Create a subdomain such as staging.example.com in your hosting panel, plus an empty database and database user for it.
- Copy every WordPress file from the live site into the subdomain’s folder, over SFTP or with your host’s file manager.
- Export the live database and import it into the new one.
- In wp-config.php on the copy, enter the new database name, user and password, and add the line below so plugins know it isn’t the live site.
- Replace the live address with the staging address in the database. Try it with –dry-run first.
- Hide the copy: tick Discourage search engines in Settings, Reading, and password-protect the subdomain.
define( 'WP_ENVIRONMENT_TYPE', 'staging' );wp db export live.sql # on the live site
wp db import live.sql # on the staging copy
wp search-replace 'https://example.com' 'https://staging.example.com' --skip-columns=guid --dry-run
wp search-replace 'https://example.com' 'https://staging.example.com' --skip-columns=guidUse wp search-replace rather than a find-and-replace on the SQL file: WordPress stores some settings as PHP serialized data, which WP-CLI updates correctly and a plain text replace breaks.
Method 4: Stage on your own computer
A local copy costs nothing and nobody else can see it. WordPress Studio is a free, open-source app for running WordPress sites on Mac, Windows and Linux, with sync to WordPress.com or Pressable and shareable preview links. WordPress Playground runs WordPress in the browser without a host, which is handy for trying a plugin, a theme or a different WordPress or PHP version in seconds.
Local copies suit theme and code work. To test against your host’s server settings, caching and real data, use a staging site on the same host.
How to push staging changes to the live site
This is where staging goes wrong. Pushing a staging copy over production replaces the live database, so anything that changed on the live site after you made the copy is lost: new orders, form entries, comments, users and posts.
- Back up the live site first, every time. Our backup guide covers four ways.
- Move only what changed. Theme, plugin and code changes often need only the files. WordPress.com syncs the database and the files in either direction, and syncing the database also replaces the user list.
- On a WooCommerce store, don’t overwrite orders. WordPress.com’s advice is to redo small theme changes on the live site, export and import new pages or products, or pause new orders and check that orders, products and customers match before you sync.
- Clear every cache afterwards (how to clear cache in WordPress), then test checkout, forms and logins on the live site.
What to test on staging before you push
- The pages that make money: the homepage, your top landing pages, and checkout or the contact form, sent for real.
- Phones as well as desktop: menus, sliders and pop-ups break on small screens first.
- Logins and accounts: the admin login, customer accounts and password resets.
- Emails: order and form notifications, sent to your own address.
- Speed: compare a few key pages before and after the change (how to speed up WordPress).
- The error log: turn on debug logging on the copy and read it after you’ve clicked around.
Common staging problems, and the fixes
| Problem | Usual cause and fix |
|---|---|
| Links or images on staging point to the live site | The live address is still in the database. Run wp search-replace again, with –dry-run first, and look for hard-coded addresses in theme settings or page builder data. |
| Staging looks broken or unstyled | Cached CSS, or a CDN still serving the live files. Clear the caches on the copy and keep it out of the CDN. |
| Customers got emails from staging | The copy sent order or form emails. Switch email off on staging, or route it to a test inbox, before you test anything. |
| Scheduled tasks ran twice | WordPress cron runs on the copy too, so subscriptions, imports or backups can fire from staging. Pause those plugins on the copy. |
| Cloning is slow or times out | A large media library or database. Leave old backups and cache folders out of the copy, or clone with WP-CLI on the server. |
| Settings vanished after a manual copy | A plain find-and-replace broke serialized data. Restore the database and use wp search-replace instead. |
Keep your staging site private
- WordPress.com always hides staging sites from search engines, whatever robots.txt or the visibility setting says.
- Elsewhere, tick Settings, Reading, Discourage search engines from indexing this site. WordPress then adds a noindex, nofollow robots tag, but it’s up to search engines to honour it, so add a password too.
- Switch payment gateways to test mode on the copy and stop it sending emails, so customers don’t get duplicate messages.
- Delete staging copies you’ve finished with. Forgotten copies miss updates and become an easy way in.
Where WPOS fits
WPOS is our product, so weigh this section accordingly. Its sandboxes are WordPress sites it sets up in one to two minutes, with WPOS connected and the plugins you pick already installed, on an address like acme-demo.try.wpos.ai or your own domain. They’re fresh sites for prototypes and demos rather than copies of your live site, and a migration key moves the finished work to real hosting. On live sites, the agent checks its work in a real browser before it reports done, every change is versioned, and you can undo one in a click.
“Update WooCommerce and the theme on the staging site, check checkout and the product pages on desktop and phone, and tell me what changed before we touch the live store.”
You can start free, with no card needed.
Frequently Asked Questions
A private copy of your live WordPress site on a separate address, used to test updates, plugins, code and design changes before visitors see them. When everything works, you push the changes to the live site or repeat them there.
Not WordPress itself. Staging comes from your host (WordPress.com offers it on its Business and Commerce plans, for example), from a plugin such as WP Staging, or from a copy you make by hand. WordPress does read WP_ENVIRONMENT_TYPE, a wp-config.php setting that tells plugins they're on a staging site.
It can be. Many managed hosts build staging into their plans, WP Staging's free version clones a site within your own hosting, and WordPress Studio and WordPress Playground cost nothing. Pushing changes back to live with one click is often a paid feature.
Not if search engines can't index it. WordPress.com hides staging sites automatically. Elsewhere, tick Discourage search engines in Settings, Reading, and put a password on the site, because that setting is only a request to search engines.
Back up first, then move only what changed. If the store has taken orders since you made the copy, redo the changes on the live site, export and import new content, or pause new orders and check that orders, products and customers match before you sync, as WordPress.com advises.
Yes. A plugin such as WP Staging copies the site into a subfolder of your existing hosting, or you can copy it by hand to a subdomain, which is how DreamHost describes staging on its shared plans.
A staging site runs on a server, usually at your own host, so it behaves like the live site. A local site runs on your computer with a tool such as WordPress Studio: it's free and private, but it won't show problems that only happen on your host.
Start free with 15,000 credits.
Three times the usual 5,000, no card needed. Then 50% off your site licences for 2 months with FRIDAY50.
Test changes before your clients see them.
WPOS puts an AI agent inside wp-admin on the sites you already run, on any host, and it checks its own work. Free for 30 days: 5,000 credits, a live site plus a sandbox, no card.