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):

  1. Log in to your hosting control panel
  2. Go to the WordPress or Site Tools area
  3. Select your website and click Staging
  4. Create a new staging environment
  5. You’ll get a staging URL (e.g., staging.yoursite.com)
  6. Test changes freely
  7. Use the “Push to Live” feature when ready

Option 2: Use a Plugin to Create a Staging Site

Recommended Plugin: WP Staging

  1. Go to Plugins > Add New
  2. Search for WP Staging
  3. Install and activate the plugin
  4. Go to WP Staging > Create New Staging Site
  5. 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)

  1. Create a subdomain (e.g., staging.yoursite.com)
  2. Copy all files from your live site to the subdomain folder via FTP or File Manager
  3. Export your live database using phpMyAdmin
  4. Import the database into a new database for staging
  5. Edit the wp-config.php file in the staging folder to use the new database
  6. 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

You may also like...