Open Source · MIT License

Live-to-staging sync,
as easy as it should be.

A tool that copies your live WordPress sites to staging — with smart WooCommerce filtering, customer anonymization, and hard production guardrails.

$ bash curl -sSL https://ada.tools/wp-stage-sync/install.sh | bash

Everything you need,
nothing you don't.

Built for agencies managing multiple WordPress sites where a full-copy staging sync is risky, slow, or legally problematic.

Smart Auto-Detection

Automatically discovers WordPress installs from Apache2 / Nginx vhosts and filesystem paths. Parses wp-config.php to extract credentials with zero manual setup.

WooCommerce Order Filtering

HPOS-aware. Exports only the N most recent (or oldest) orders — not your entire order history. Keeps customer accounts only for those included orders.

Customer Anonymization

Optionally masks billing and shipping addresses, names, emails, and phone numbers in the staging database. Admin and editor accounts are always preserved intact.

File Sync via rsync

Syncs wp-content/ with customizable folder exclusions. Detects staging webroot ownership and applies the correct chown automatically.

Domain Mapping

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.

Production Guardrails

The live database is strictly read-only. Path and database validation prevent accidental self-overwrite. Zero INSERT, UPDATE, or DROP touches production — ever.


Four steps, fully automated.

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...

Step 0

Database Export

Queries live DB read-only. Filters HPOS order tables, excludes bulk session data.

  • Target N orders from wc_orders
  • Linked customers preserved
  • Structure-only export for specific tables
  • Custom rules for order related tables
Step 1

Database Import

Drops all staging tables, imports clean with foreign key checks disabled.

  • Full staging DB reset
  • FOREIGN_KEY_CHECKS=0
  • Anonymization applied here
Step 2

File Sync

rsync with --delete, skipping cache and build artifacts.

  • Excludes cache, ewww, litespeed, updraft etc.
  • Toggle exclusions in interface
  • Auto-detects ownership
Step 3

Post-processing

WP-CLI handles domain replacement and plugin-specific URL rewrites.

  • wp search-replace all tables
  • Elementor URL replace
  • Jetpack safe mode
  • Cache flush

Built for HPOS. Not compatible with legacy order storage.

wp-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.

wc_orders wc_order_addresses wc_orders_meta wc_order_stats wc_order_product_lookup wc_order_tax_lookup wc_order_coupon_lookup

Production is safe.

Every mutation targets staging. The live site connection is enforced read-only at the query level.

Read-only live connection

Only SELECT and SHOW queries run against production. Zero writes — ever.

Path validation

Aborts if live and stage directories resolve to the same filesystem path.

Database validation

Aborts if live and staging point to the same database name and host.

Staging-only mutations

All DROP, INSERT, rsync --delete, chown, and WP-CLI calls target staging exclusively.


Up and running in seconds.

Requires Linux with MySQL/MariaDB, rsync, and WP-CLI available. Go 1.21+ only needed if building from source.

Quick Install

curl -sSL https://ada.tools/wp-stage-sync/install.sh | bash

Auto-detects amd64 / arm64. Resolves the latest release tag via GitHub API.

From Source

# 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.


Built by an agency, for agencies.

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.