A tool that copies your live WordPress sites to staging — with smart WooCommerce filtering, customer anonymization, and hard production guardrails.
Built for agencies managing multiple WordPress sites where a full-copy staging sync is risky, slow, or legally problematic.
Automatically discovers WordPress installs from Apache2 / Nginx vhosts and filesystem paths.
Parses wp-config.php
to extract credentials with zero manual setup.
HPOS-aware. Exports only the N most recent (or oldest) orders — not your entire order history. Keeps customer accounts only for those included orders.
Optionally masks billing and shipping addresses, names, emails, and phone numbers in the staging database. Admin and editor accounts are always preserved intact.
Syncs wp-content/
with customizable folder exclusions. Detects staging webroot ownership and applies the correct
chown
automatically.
Runs WP-CLI search-replace for domain URLs. Handles Elementor URL settings automatically, puts Jetpack into safe mode, so your staging sites works out of the box.
The live database is strictly read-only. Path and database validation prevent accidental self-overwrite. Zero INSERT, UPDATE, or DROP touches production — ever.
Run wp-stage-sync
and the interface walks you through each phase.
After saving settings, use -u
for unattended runs. Use it in crons, in automations...
Queries live DB read-only. Filters HPOS order tables, excludes bulk session data.
wc_ordersDrops all staging tables, imports clean with foreign key checks disabled.
FOREIGN_KEY_CHECKS=0
rsync with --delete,
skipping cache and build artifacts.
WP-CLI handles domain replacement and plugin-specific URL rewrites.
wp search-replace
all tableswp-stage-sync queries wc_orders
directly and filters all HPOS lookup tables by order ID. Backwards compatibility mode (legacy wp_posts-based
order tables) is not supported.
Every mutation targets staging. The live site connection is enforced read-only at the query level.
Only SELECT and SHOW queries run against production. Zero writes — ever.
Aborts if live and stage directories resolve to the same filesystem path.
Aborts if live and staging point to the same database name and host.
All DROP, INSERT, rsync --delete, chown, and WP-CLI calls target staging exclusively.
Requires Linux with MySQL/MariaDB, rsync, and WP-CLI available. Go 1.21+ only needed if building from source.
curl -sSL https://ada.tools/wp-stage-sync/install.sh | bash
Auto-detects amd64 / arm64. Resolves the latest release tag via GitHub API.
# Requires Go 1.21+
go install github.com/ \
AdaDigitalAgency/ \
wp-stage-sync/ \
cmd/wp-stage-sync@latest
Then: run wp-stage-sync for
the interactive interface, or wp-stage-sync -u
for unattended mode.
Self-update
wp-stage-sync --update
Downloads latest release and replaces the binary in-place.
Unattended mode
wp-stage-sync -u
Skips interface, reads saved
config
from ~/.config/wp-stage-sync/sites/.
Perfect for cron.
Version
wp-stage-sync --version
Check current binary version.
wp-stage-sync is open source and MIT-licensed. If it saves you time, a star goes a long way. PRs and issues are welcome.
wp-stage-sync is an independent, open-source project. It is not affiliated with, endorsed by, or sponsored by WordPress, WordPress.org, the WordPress Foundation, or Automattic. The WordPress® trademark is the property of the WordPress Foundation.