Services Tools Pricing About Process Referral Program News Contact Get Started
Creating a WordPress Staging Site for Safe Testing

Creating a WordPress Staging Site for Safe Testing

Learn how to create a WordPress staging environment to test changes safely before they go live. Step-by-step guide with plugins and manual methods.

Your website is live. Visitors are browsing. Then you install a new plugin and everything breaks.

We've all been there. One small change can crash your site, lose sales, and damage your reputation. This is exactly why you need a staging site.

A WordPress staging site is a copy of your live website where you can test changes safely. Think of it as a workshop where you can experiment without customers watching.

What You'll Learn

By the end of this guide, you'll know how to:

  • Set up a staging environment using plugins
  • Create a manual staging site
  • Test changes safely before going live
  • Sync updates from staging to production

Let's dive in.

Why Every WordPress Site Needs Staging

Your live website handles real visitors and real business. Making changes directly on it is like performing surgery without anaesthetic – risky and painful.

A staging site eliminates this risk. You can:

  • Test new themes and plugins
  • Update WordPress core safely
  • Try design changes
  • Debug issues without downtime
  • Show clients previews before launch

Method 1: Using a Staging Plugin (Easiest)

The simplest way to create a staging site is with a plugin. Here are the best options:

WP Staging (Free)

  1. Install the plugin from your WordPress admin
  2. Go to WP Staging in your sidebar
  3. Click "Create New Staging Site"
  4. Choose a subdirectory name (like "staging" or "test")
  5. Select what to clone (usually everything)
  6. Click "Start Cloning"

The plugin creates a copy at yoursite.com/staging. Simple.

UpdraftPlus Premium

If you already use UpdraftPlus for backups, their premium version includes staging:

  1. Install UpdraftPlus Premium
  2. Go to Advanced Tools
  3. Click "Clone/Migrate"
  4. Follow the wizard to create your staging site

This method integrates with your existing WordPress maintenance workflow.

Method 2: Manual Staging Setup

For more control, you can create a staging site manually. This requires basic technical knowledge but gives you complete flexibility.

Step 1: Create a Subdomain

In your hosting control panel:

  1. Add a new subdomain (staging.yoursite.com)
  2. Point it to a new directory (/public_html/staging/)
  3. Wait for DNS to propagate (usually 30 minutes)

Step 2: Copy Your Files

Using File Manager or FTP:

  1. Zip your entire WordPress installation
  2. Upload the zip to your staging directory
  3. Extract the files
  4. Set correct file permissions (755 for folders, 644 for files)

Step 3: Export Your Database

In phpMyAdmin:

  1. Select your live database
  2. Click "Export"
  3. Choose "Quick" export method
  4. Download the SQL file

Step 4: Create a New Database

  1. Create a new database for staging
  2. Create a database user with full permissions
  3. Import your exported SQL file

Step 5: Update wp-config.php

Edit your staging site's wp-config.php:

define('DB_NAME', 'your_staging_database');
define('DB_USER', 'your_staging_user');
define('DB_PASSWORD', 'your_staging_password');

Step 6: Update Site URLs

In your staging database, run these SQL commands:

UPDATE wp_options SET option_value = 'https://staging.yoursite.com' WHERE option_name = 'home';
UPDATE wp_options SET option_value = 'https://staging.yoursite.com' WHERE option_name = 'siteurl';

Your staging site is now ready for testing.

Testing Your Changes Safely

Now you can test anything without fear:

Testing New Plugins

  1. Install the plugin on staging first
  2. Test all functionality thoroughly
  3. Check for conflicts with existing plugins
  4. Monitor performance impact
  5. Only install on live if everything works

Theme Updates

  1. Update the theme on staging
  2. Check all pages for layout issues
  3. Test forms and functionality
  4. Verify mobile responsiveness
  5. Update live only when satisfied

WordPress Core Updates

  1. Update WordPress on staging
  2. Test admin functionality
  3. Check frontend display
  4. Verify plugin compatibility
  5. Apply to live if stable

Common Issues and Solutions

"Site Not Found" Error

This usually means DNS hasn't propagated or your subdomain isn't configured correctly. Wait 30 minutes and try again.

Database Connection Error

Check your wp-config.php database credentials. Make sure the staging database user has the correct permissions.

Images Not Loading

If images show as broken links, they're still pointing to your live site. Either:

  • Update image URLs in the database
  • Use a plugin like Velvet Blues Update URLs

Search and Replace Issues

When moving between staging and live, use plugins like Better Search Replace to update URLs throughout your database safely.

Syncing Changes Back to Live

Once you're happy with your staging changes, you need to move them to your live site carefully.

For Plugin/Theme Files

  1. Download changed files from staging
  2. Upload to your live site via FTP
  3. Test immediately after upload

For Database Changes

  1. Export specific tables from staging
  2. Import to live database (backup first!)
  3. Update URLs back to live domain

Using Migration Plugins

Tools like All-in-One WP Migration can automate this process, but always test on a free website audit first.

Maintenance and Best Practices

Keep Staging Updated

Update your staging site regularly with fresh content and database changes from live. This keeps your testing environment realistic.

Password Protection

Add password protection to your staging site to prevent search engines indexing it and confusing visitors.

Regular Cleanup

Delete old staging sites you're not using. They consume server resources and can become security risks if forgotten.

Document Changes

Keep notes on what you've tested and when. This helps track what's ready to go live and what still needs work.

Advanced Staging Workflows

Multiple Staging Sites

For complex projects, create multiple staging environments:

  • Development - for major changes
  • Staging - for final testing
  • Live - for production

Version Control

If you're comfortable with Git, consider using version control to track changes between environments.

What's Next?

Now you know how to test changes safely with staging sites. This is fundamental to professional WordPress development.

Next, learn about website maintenance best practices to keep your site running smoothly, or explore our WordPress hosting options that include built-in staging environments.

Remember: every change should go through staging first. Your live website – and your visitors – will thank you for it.

WC

Web Cardiff

Cardiff's WordPress specialists helping Welsh businesses grow online.

Need help with your website?

Get a fast, secure website that wins you business.

Get in touch