Skip to content
GPLWP Guides

How to create staging sites for WordPress

Backup & Migration Time About 45–90 minutes Updated 8 Nov 2026

BACKUP & MIGRATION
The short answer

Create a staging site by copying your WordPress files and database to a separate location, then update its database connection and URLs. Your hosting panel may provide a quicker staging tool; otherwise, use a migration plugin or handle the copy manually with care.

What you need

  • Administrator access to the live WordPress site
  • Hosting or server access with a separate database
  • A staging domain or subdomain with HTTPS
  • A complete backup stored away from the live site
The fast route

Let MainWP Staging Extension do it

MainWP-based cloning and one-click pushes across managed sites; ideal for agencies testing changes before going live.

Get MainWP Staging Extension

Questions

Can I create a WordPress staging site without a plugin?
Yes. You can copy the files and database yourself, create a separate database, update the staging configuration and replace the live URLs. The drawback is that manual migrations are easy to get wrong, especially with serialized data, HTTPS redirects and large databases. A host-provided staging tool or migration plugin is usually safer when you need to repeat the process.
Should a staging site use the live database?
No. A staging site should use its own database. If staging shares the live database, tests can alter real content, users, settings or orders. Copy the live database into a separate staging database, then update the staging copy's database credentials and URLs. Keep the live database untouched while you test.
Why does my staging site redirect to the live site?
The usual cause is that the copied database still contains the live values for the WordPress Address or Site Address. Conflicting URL constants in wp-config.php, cached redirects, HTTPS settings or an incomplete search and replace can cause the same problem. Check both URL settings, clear caches and confirm that staging points to its own database.
Can I push a staging site back to live?
Yes, but a push is not always a safe merge. Replacing the live database can remove orders, comments, submissions and user changes made after staging was created. Take a fresh backup, compare what changed on both sites and use a maintenance window. For WooCommerce, avoid pushing an old staging database over a live store unless you have a plan for current orders and customer data.