How do I set up a staging site for WordPress?
Applies to: WordPress.org (self-hosted)
Last updated: May 2025
Problem
You want to test updates, plugin changes, or design tweaks without affecting your live site—but you’re unsure how to safely create a test environment.
Solution
A staging site is a clone of your live WordPress site where you can safely make and test changes before pushing them to your production (live) site. You can set one up using:
- Your web host’s built-in staging tool
- A plugin
- Manual setup (for advanced users)
Option 1: Use Your Hosting Provider’s Staging Tool (Easiest)
Many WordPress hosts include one-click staging environments.
Hosts that support this:
- SiteGround
- Bluehost
- Kinsta
- WP Engine
- DreamHost
- Flywheel
Steps (varies slightly by host):
- Log in to your hosting control panel
- Go to the WordPress or Site Tools area
- Select your website and click Staging
- Create a new staging environment
- You’ll get a staging URL (e.g.,
staging.yoursite.com
) - Test changes freely
- Use the “Push to Live” feature when ready
Option 2: Use a Plugin to Create a Staging Site
Recommended Plugin: WP Staging
- Go to Plugins > Add New
- Search for WP Staging
- Install and activate the plugin
- Go to WP Staging > Create New Staging Site
- Name your staging site and click Start Cloning
The plugin creates a private staging site like yoursite.com/staging/
with:
- Password protection
- Separate database table prefix
- No risk to the live site
Note: The free version supports staging; pushing changes live is a pro feature.
Option 3: Manually Create a Staging Site (Advanced)
- Create a subdomain (e.g.,
staging.yoursite.com
) - Copy all files from your live site to the subdomain folder via FTP or File Manager
- Export your live database using phpMyAdmin
- Import the database into a new database for staging
- Edit the
wp-config.php
file in the staging folder to use the new database - Update site URLs in the database (use a tool like Search Replace DB or run SQL commands)
Best Practices
- Always protect the staging site with a password or limit access by IP
- Use a separate database or table prefix to avoid conflicts
- Don’t index the staging site—ensure Search Engine Visibility is turned off in Settings > Reading
- Back up your live site before pushing changes from staging to production