WordPress Site Staging: How to Safely Test Changes
Asad Ali
Founder & Lead Developer · Former WordPress Core Contributor
WordPress Site Staging: How to Safely Test Changes
Nothing worse than updating a plugin and watching your live site break. Staging environments let you test changes before they affect visitors.
This guide covers how to set up staging for WordPress—and why modern alternatives make this easier.
What Is a Staging Site?
A staging site is a copy of your live website where you can:
- Test plugin updates before installing on production
- Try new themes without affecting visitors
- Test code changes safely
- Train new team members
- Debug issues without downtime
The rule: Never test on production.
Method 1: Hosting Provider Staging
Many managed WordPress hosts include staging built-in.
WP Engine
1. Go to Sites → Your Site → Add Staging
2. Click "Copy site to staging"
3. Access via staging.yoursite.com
4. Test changes
5. Push to production when ready
Pros: One-click, integrated, reliable
Cons: Requires WP Engine hosting ($20+/month)
Kinsta
1. Go to Sites → Your Site → Environments
2. Click "Create Staging Environment"
3. Choose Standard or Premium staging
4. Push/pull changes between environments
Pros: Premium staging with own database
Cons: Kinsta pricing ($35+/month)
SiteGround
1. Go to Site Tools → WordPress → Staging
2. Create staging copy
3. Test changes
4. Deploy to production
Pros: Included with hosting
Cons: SiteGround specific
Other Hosts with Staging
| Host | Staging Included | Notes |
| WP Engine | ✅ | 3 environments |
| Kinsta | ✅ | Standard or Premium |
| Flywheel | ✅ | Simple one-click |
| SiteGround | ✅ | In Site Tools |
| Cloudways | ✅ | Clone feature |
| Bluehost | ✅ (Pro) | Add-on feature |
Method 2: Staging Plugins
If your host doesn't offer staging, use a plugin.
WP Staging
Free version:
- Clone site to subdirectory
- Separate database
- Easy one-click cloning
Pro version ($89/year):
- Push to live
- Scheduled backups
- Multisite support
Setup:
1. Install WP Staging plugin
2. Click "Create Staging Site"
3. Choose what to clone
4. Access staging at yoursite.com/staging
BlogVault
Features:
- Off-site staging (doesn't use your hosting resources)
- One-click sync
- Merge functionality
- Built-in backup
Pricing: $89/year
InstaWP
Features:
- Instant WordPress sandboxes
- No server needed
- Template-based sites
- Collaboration tools
Great for: Quick tests, client previews
Method 3: Local Development
Test on your computer before touching the server.
Local by Flywheel (Free)
Best for beginners:
1. Download Local
2. Create new site
3. Pull from live site (with add-on)
4. Test changes
5. Push to live (with add-on/manual)
Pros: Free, easy, includes SSL
Cons: Need pull/push add-on or manual migration
DevKinsta (Free)
From Kinsta, but works with any host:
1. Download DevKinsta
2. Create new site
3. Import database + files
4. Test changes
5. Export changes
Docker-based Options
For developers:
- Docker + WordPress image
- Laravel Valet (Mac)
- DDEV
More technical but very flexible.
Method 4: Subdomain Staging
DIY staging on most hosts:
Steps
1. Create subdomain: staging.yoursite.com
2. Install WordPress on subdomain
3. Clone database:
mysqldump -u user -p live_db > backup.sql
mysql -u user -p staging_db < backup.sql
4. Copy files:
rsync -avz live/wp-content/ staging/wp-content/
5. Update URLs:
UPDATE wp_options SET option_value = 'https://staging.yoursite.com'
WHERE option_name = 'siteurl' OR option_name = 'home';
Considerations
- Password protect staging (don't want Google indexing it)
- Block robots:
User-agent: *
Disallow: /
- Sync carefully - don't overwrite live data by accident
Staging Best Practices
1. Match Environments
Staging should mirror production:
- Same PHP version
- Same WordPress version
- Same plugins (versions)
- Similar server config
2. Protect Staging
Don't let staging sites be public:
- Password protect
- Block search engines
- Use .htaccess rules
.htaccess for staging
AuthType Basic
AuthName "Staging"
AuthUserFile /path/.htpasswd
Require valid-user
3. Sync Carefully
Before syncing staging → production:
- Backup production first
- Note database changes (new content on live)
- Test sync process
- Have rollback ready
4. Don't Sync Sensitive Data
When pulling from production:
- Consider anonymizing user data
- Remove order/payment info
- Clear cache/transients
Common Staging Mistakes
Mistake 1: Forgetting Database URLs
After cloning, URLs still point to production. Use:
- Better Search Replace plugin
- WP-CLI:
wp search-replace 'live.com' 'staging.com'
Mistake 2: Overwriting Live Content
Staging → Production push overwrites everything. If editors added content to live during testing, it's gone.
Solution: Push selectively or note content changes.
Mistake 3: Not Blocking Search Engines
Google finds and indexes staging sites. This causes:
- Duplicate content issues
- Embarrassing indexed content
- SEO problems
Solution: Noindex, password protect.
Mistake 4: Testing with Real Payments
If testing WooCommerce:
- Use sandbox payment gateways
- Stripe test mode
- PayPal sandbox
Never test with real payment processing.
The Modern Alternative: Git-Based Workflow
With static sites and modern hosting, staging is automatic:
How It Works
1. Main branch = Production site
2. Feature branches = Staging environments
3. Push branch → Automatic preview URL
4. Merge to main → Auto-deploys to production
Platforms with Automatic Previews
| Platform | Preview Feature |
| Vercel | Preview per PR |
| Netlify | Deploy previews |
| Cloudflare Pages | Preview branches |
Example Workflow
Create feature branch
git checkout -b new-design
Make changes
Commit
git add .
git commit -m "New homepage design"
Push
git push origin new-design
Platform creates preview URL automatically
https://new-design.yoursite.vercel.app
After review, merge to main
Production updates automatically
Benefits:
- Every change has a preview
- No manual staging setup
- Rollback = revert commit
- Full history of changes
Comparison: WordPress vs Modern Staging
| Aspect | WordPress Staging | Modern (Git-based) |
| Setup | Complex | Automatic |
| Cost | Often paid | Usually free |
| Previews | Manual | Every commit |
| Rollback | Backup-based | Git revert |
| Collaboration | Limited | PR reviews |
| Risk | Medium | Low |
FAQ
Q: Can I use free staging solutions?
Yes, WP Staging free version, Local by Flywheel, and DIY subdomain staging all work. They just require more manual effort.
Q: How often should I sync staging with production?
Before any testing session. Outdated staging can give false results.
Q: Can I have multiple staging environments?
Some hosts support this (WP Engine has 3). Otherwise, you'd need multiple subdomains.
Q: What about e-commerce staging?
More complex because of orders, inventory, etc. Use read-only database dumps and sandbox payments.
Conclusion
Staging is essential for safe WordPress updates:
1. Managed hosting staging → Easiest if your host offers it
2. Plugins → Good middle ground
3. Local development → Best for developers
4. DIY subdomain → Budget option
But consider: modern static sites have automatic staging through Git-based previews. Every branch is a staging environment.
Related Articles
View allWordPress Database Explained: A Complete Guide
Understand how WordPress stores data. Tables, relationships, and why this matters for performance and migration.
WordPress Multisite: When It Makes Sense (And When to Avoid It)
Understand WordPress Multisite architecture, use cases, limitations, and modern alternatives for managing multiple sites.
Local Development for WordPress (and Why Modern Tools Are Better)
Compare WordPress local development tools: Local, MAMP, Docker, and DevKinsta. Then see how modern frameworks make development easier.
WordPress REST API: A Complete Guide for Developers
Master the WordPress REST API. Understand endpoints, authentication, custom routes, and how this enables headless WordPress.