Linux 软件免费装
Banner图

Miroir Local Sync

开发者 tommybordas
更新时间 2026年9月9日 21:23
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

migration sync database staging deployment

下载

1.4.0 1.1.12 1.4.1 1.4.2 1.1.11 1.1.7 1.1.8 1.1.10 1.1.13 0.5.0 0.5.1 1.0.0 0.4.11 1.1.0 1.1.1 1.1.2 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.3 1.1.5 1.1.6 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.4.3 1.4.4 1.4.5 1.1.4 1.5.0 1.5.1

详情介绍:

Miroir keeps a local WordPress environment and one or more remote sites in sync, with an interface designed for non-technical users. The same plugin embeds two roles: an orchestrator on the local site and an agent on each remote site. They communicate over the WordPress REST API (authenticated with Application Passwords) and, optionally, SFTP. Features:

安装:

  1. Install and activate Miroir on the remote (production) site.
  2. Install and activate Miroir on the local site.
  3. On the local site, open Miroir, add the remote URL and approve the connection.

屏幕截图:

  • Comparison screen with per-component diff and data-loss warnings.
  • Global settings and system status.

升级注意事项:

1.4.0 Performance release: Miroir stops loading on pages that do not use it, dumps are compressed and sent in 4 MB chunks, and long imports no longer look stalled. Update the Agent on every paired site to get the compressed transfers; a 1.3.x Agent still works, more slowly. 1.3.0 Clearer screens: which side is newer, what a push will do, last sync on each site card, one-click rollback, log details, merge preview. Update the Agent on remote sites so snapshots say what they were taken before. 1.2.0 Major safety release: automatic rollback fixed, input validation, atomic locks, one-pass search-replace, file rollback. Update Miroir on BOTH the local site and every remote site ("Update the Agent" on the site card) to get the reliable rollback.

常见问题:

Does this replace a backup plugin?

No. Miroir is a development and deployment tool, complementary to a general backup solution.

Is WordPress Multisite supported?

Not yet. Miroir targets standard (single-site) WordPress installs on both ends: the database engines (full dump/import, search-replace) are not designed for the shared tables of a network. To prevent any data loss, Miroir disables its operations when it detects a Multisite network. Syncing with multiple separate production sites is fully supported.

Is WooCommerce supported?

Yes for full database sync. Per-type content merge intentionally excludes WooCommerce products and orders.

Can I push my local database without overwriting new orders on the shop?

Yes. Enable "Protect live data on the target" in the push wizard (on by default when WooCommerce is active): orders (HPOS), order items, sessions, analytics lookups, users and comments/reviews are excluded from the push, so the live shop keeps them. Note: if the site still stores orders in wp_posts (legacy mode, HPOS disabled), those specific rows cannot be protected at table level.

Can syncs run automatically?

Yes. Settings → Scheduled sync lets you run a pull (or push) hourly, twice daily, daily or weekly via WP-Cron, with email/webhook notification. For large sites, prefer a real system cron calling WP-CLI, e.g.: 0 3 * * * cd /path/to/site && wp miroir pull --profile=<id> --db --yes

Is there a WP-CLI integration?

Yes: wp miroir status (connected sites), wp miroir compare --profile=<id> (data-loss alerts), wp miroir push|pull --profile=<id> [--db --themes --plugins --media] [--dry-run] [--protect] [--yes].

Will a push delete data on the target?

A full database push replaces the target database, so rows that exist only on the target are removed. The comparison screen warns about this before you confirm, and a snapshot is taken so a rollback is possible. Content merge (by post type) and file deployment are additive and never delete.

What if my host has no SSH/SFTP?

Everything works over the REST API (chunked transfer). SFTP is optional and only speeds up file transfers on hosts that provide SSH.

Are my credentials safe?

Yes. Application Passwords and SFTP secrets are encrypted at rest (AES-256-GCM) and never logged in clear text. The agent only answers users with manage_options.

Will large sites time out?

The database search-replace is resumable (processed in time-bounded chunks), file transfers are chunked, and native mysqldump/mysql are used when available.

Are my dumps reachable from the web?

Miroir stores its dumps and snapshots in a folder under wp-content/uploads whose name carries a random key, protected by an .htaccess file and an index.php. On Apache that is enough. On nginx the .htaccess is ignored, so the files would be downloadable by anyone who guessed the address. The system status screen warns you when it detects nginx. Add this to the server configuration, on both sites: location ~* /uploads/miroir-local-sync-[^/]+/ { deny all; return 404; } A dump contains everything the database contains — password hashes, e-mail addresses, orders. This block is not optional on nginx.

更新日志:

1.5.1 1.5.0 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 A performance release: nothing moves on screen, but what was slow is now fast, and the operations that used to give up on large sites finish. Update the Agent on every paired site to get compressed dumps and 4 MB transfer chunks. A local site on 1.4.0 keeps working with a remote site still on 1.3.x: it simply falls back to the smaller chunks and to uncompressed dumps. Speed Long operations Fixes Under the hood 1.3.2 1.3.1 1.3.0 Ten things a user expects to see at a glance, found by re-reading every screen through a user's eyes. 1.2.0 Safety net Refusing what should never have been accepted One operation at a time Database engine Content merge Screens WP-CLI and scheduled runs Entries for versions before 1.2.0 were removed: the plugin directory truncates any changelog longer than 5,000 words, which cut the recent releases — the ones that matter when deciding whether to update.