Need to push a WordPress staging site to live (including a free option) or push the staging database to live? Use this safe checklist: back up both sites, enable maintenance mode, choose your path (host tool, free plugin, or manual/CLI), run URL search-replace, and do post-launch checks.
How do I push a WordPress staging site to live, ideally with a free method?
Files: copy only changed files from staging to live (theme/child theme/custom plugin/uploads created in staging). Avoid overwriting user uploads added on live during development.
Database (export on staging → import on live):
# On STAGING
wp db export staging.sql
# Transfer staging.sql to LIVE, then on LIVE:
wp db export live-backup-before-import.sql
wp db import staging.sql
# Replace staging URLs with live URLs (skip GUIDs)
wp search-replace 'https://staging.example.com' 'https://example.com' \
--all-tables --skip-columns=guid --precise --recurse-objects
WooCommerce or active sites: if live has new orders/users since you created staging, a full DB overwrite will lose that data. In that case, deploy files only and migrate only what’s required (options/menus) or schedule a short maintenance window.
wp maintenance-mode activate
# deploy...
wp maintenance-mode deactivate
Use a serialized-safe search-replace tool when possible; avoid raw SQL for serialized data. If you must update only base URLs:
UPDATE wp_options
SET option_value = REPLACE(option_value,'https://staging.example.com','https://example.com')
WHERE option_name IN ('siteurl','home');
Summary: free path = files + DB via backups and WP-CLI (or plugin + manual DB). For ongoing stores, prefer a short maintenance window or file-only deploy to avoid data collisions.
How do I push only the database from staging to live?
wp db export live-backup-before-db-push.sql
# On STAGING
wp db export staging.sql
# On LIVE
wp db import staging.sql
wp search-replace 'https://staging.example.com' 'https://example.com' \
--all-tables --skip-columns=guid --precise --recurse-objects
Import only needed tables (e.g., options) instead of a full overwrite:
# Export only specific tables on STAGING
wp db export staging-options.sql --tables=wp_options
# Then import on LIVE
wp db import staging-options.sql
Rule of thumb: a DB push is safest during a maintenance window; otherwise prefer files-only deploy and apply settings/content changes in admin.