Moving a WordPress staging site to live should start with a deployment plan, not a full database overwrite. Back up production, identify exactly what changed, choose the smallest transfer that carries those changes, and test the live site afterward. For a shop or booking website, protecting new customer activity is the most important part of that plan.
Decide what actually needs to move
Write a short change list before opening the deployment tool. A release might contain a child-theme file, a plugin update, three redesigned pages, or a complete site rebuild. These are different jobs. A files-only push can deploy code, but it will not carry page-builder layouts or settings stored in the database.
For example, imagine that staging was created on Monday and a homepage redesign finished on Friday. During that time the live store received orders. Replacing the entire live database with Monday’s copy would leave those newer orders out of the replacement. Treat this as a data-preservation problem before choosing a convenient migration button.
1. Prepare a recoverable production backup
Create a fresh backup of the live database and the files needed to restore the site, including uploads, themes, plugins and configuration. Check that you can access the backup independently of WordPress. Record its creation time and the person who can restore it. A backup is only useful during a failed release if you know where it is and how recovery works.
Agree on a deployment window and a rollback decision point. A simple release note can list the expected changes, checks to perform and conditions that mean you should stop. Avoid combining unrelated redesign work, server changes and plugin replacements in one release unless they must happen together.
2. Preserve orders, bookings and new content
WordPress hosting guidance recommends preferring files-only pushes where possible and backing up before replacing tables. New orders, users and comments may exist only on production. Selective database transfer requires knowledge of the plugin’s related tables and records; copying one table is not necessarily a complete or consistent transfer.
For a content-only change, consider recreating or importing the selected page and its dependencies rather than replacing all site data. For an active store, ask the host or a developer to define how live changes will be retained. A quiet traffic period does not guarantee that no orders, webhooks or scheduled tasks will run.
3. Review environment-specific settings
Keep staging protected from public access and make sure test activity cannot trigger real customer messages or transactions. Before launch, review the destination’s payment mode, email delivery, webhooks, analytics, cache configuration and any external integrations. Use the correct live configuration rather than blindly copying test values.
The WordPress environment type should identify staging as staging and production as production. If you use the WP_ENVIRONMENT_TYPE constant, make sure a staging value is not carried into the live configuration. Also review indexing controls: the public destination should use your intended search settings, while the test copy remains restricted.
4. Replace staging URLs safely when required
When the destination address changes, stored links and media references may still contain the staging hostname. WordPress Address and Site Address are important, but changing those fields alone may not update every reference. Use the migration tool’s documented URL replacement process or a serialization-aware tool.
For an experienced administrator using WP-CLI, search-replace offers a dry-run mode that reports proposed replacements without saving them. Confirm the target installation, the old and new URLs, and the tables in scope before reviewing that report. Do not run a broad replacement against an unidentified database or use plain SQL replacement on serialized values.
5. Verify the public website after deployment
Check the homepage, an article, navigation, images and mobile layout. Then follow the journeys that matter to the business: a contact enquiry, account login, product checkout or booking. Confirm that messages reach the intended mailbox and that production integrations use their correct settings. Use provider-approved test methods for payments.
Inspect HTTPS, redirects and broken links, then clear the relevant caches. If images or styles still point to staging, investigate the stored URL or generated asset reference instead of repeatedly clearing every cache. Our mixed content troubleshooting guide covers a related post-migration problem.
A practical handover record
Keep the backup timestamp, deployment scope, changed pages, completed checks and any remaining issues together. Record who signed off the result and when to review error logs or enquiries. For ongoing performance housekeeping, read our WordPress database optimization guide.
Frequently asked questions
Can I push only theme files? Yes, if the release consists of those files. Database-stored layouts and options need a separate deployment method.
Should I overwrite the live database? Only when the migration plan accounts for current production data and recovery. It is particularly risky on an active shop or booking site.
Official references
WordPress staging guidance · Migrating WordPress · WP-CLI search-replace reference
