WordPress Staging Setup: Test Before Going Live
Create WordPress staging environment to test updates, plugins, themes safely. Learn manual and plugin-based staging methods for shared hosting and VPS.
On this page
Staging is a copy of your live WordPress site where you test everything before pushing to production. Test plugin updates, theme changes, site modifications—all on a safe copy. If something breaks, your live site stays untouched.
Why Staging Matters
Real example scenario:
- ❌ You update a plugin directly on live site
- ❌ It conflicts with another plugin, site breaks
- ❌ 100 visitors see 500 error
- ❌ You frantically try to fix it live
- ❌ More errors happen during fix
With staging:
- ✅ Update plugin on staging first
- ✅ Find the conflict immediately
- ✅ Disable conflicting plugin or find alternative
- ✅ Test thoroughly on staging
- ✅ Update live site confidently
- ✅ Zero downtime, happy users
Staging Methods
| Method | Effort | Cost | Best For |
|---|---|---|---|
| Manual (Subdomain) | High | Free | Technical users |
| Duplicator Plugin | Low | Free | Most users |
| WP Staging Pro | Very Low | $99/year | Frequent staging |
| All-in-One WP Migration | Low | Free/Pro | Simple cloning |
| Backup plugin staging | Low | Free/Paid | Backup-integrated |
Manual Staging (Subdomain)
Step 1: Create subdomain in cPanel
- cPanel → Addon Domains (or Subdomains)
- Create:
staging.yourdomain.com - Document root:
/public_html/stagingor separate account
Step 2: Backup production WordPress
# Via cPanel: Backups → Download backup
# Or via SSH:
mysqldump -u username -p databasename > backup.sql
tar -czf public_html.tar.gz /path/to/public_html
Step 3: Restore to staging subdomain
- Upload WordPress files to staging subdirectory
- Create new database for staging
- Import backed-up SQL file to staging database
- Edit staging wp-config.php with staging database credentials
Step 4: Update staging WordPress URL
# In WordPress admin on staging:
Settings → General
Home URL: https://staging.yourdomain.com
Site URL: https://staging.yourdomain.com
Staging Plugins
Much easier: Use plugins that automate staging
Duplicator (Free, most popular)
- Install Duplicator plugin
- Click "Create Package"
- Download package (ZIP file)
- Upload installer.php to staging subdomain
- Run installer (it creates everything automatically)
All-in-One WP Migration (Free)
- Install plugin on production
- Click "Export to File"
- Download exported file
- Install plugin on staging
- Import the file
Using Duplicator Plugin (Detailed)
On production site:
- Plugins → Add New → Search "Duplicator" → Install & Activate
- Go to Duplicator menu
- Click "Create New"
- Verify requirements (should all be green)
- Click "Next"
- Review settings, click "Build"
- Download the installer and archive files (2 files)
On staging site:
- Create fresh WordPress or empty directory
- Upload installer.php to staging root
- Upload archive.zip to staging root
- Visit: https://staging.yourdomain.com/installer.php
- Follow the installer steps (3 steps total)
- Done! Staging is exact copy of production
Sync Changes to Production
After testing successfully on staging, sync back to production:
Option 1: Duplicate from staging to production (not recommended - more complex)
Option 2: Apply changes manually to production
- If you updated a plugin → update same plugin on production
- If you modified theme → apply same modifications to production
- If you added plugin → install same plugin on production
Option 3: Use WP Staging Pro for 1-click push to production
Best Practices
- Regular sync: Update staging regularly from production to stay current
- Never live edit: Always test on staging first
- Document changes: Track what you tested and verified
- Backup before big changes: Even on staging, backup before major updates
- Test thoroughly: Click all major functions, verify forms work, check performance
- Test on different devices: Check mobile responsiveness on staging
- Test after updates: Always test WordPress, plugin, theme updates on staging first
Add to staging's robots.txt: User-agent: * and Disallow: /. This prevents Google from indexing your staging site.
Related: WordPress backups | WordPress updates | Database backups
Need managed WordPress hosting?
Run WordPress on UnderHost managed hosting with performance tuning, SSL, backups, security guidance, and expert support.





















