Açıklama
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:
- Push (local to production) and Pull (production to local) of the database.
- Safe search-replace that handles PHP-serialized data, escaped JSON (Gutenberg blocks) and
wp_options. - Automatic snapshot and rollback before a database import.
- Comparison screen with a per-component diff and data-loss warnings.
- File deployment of specific themes and plugins.
- Editorial content merge by post type (GUID-matched, no deletion; WooCommerce excluded).
- One-click deployment shortcuts.
- REST (chunked) and SFTP transport.
- Live data protection on push: WooCommerce orders, customers, users, comments and reviews on the target keep their current state.
- Scheduled sync (WP-Cron): refresh your local copy from production automatically.
- WP-CLI commands (
wp miroir status|compare|push|pull) for CI/CD and system crons. - Webhook notifications (Slack, Discord, custom endpoint) in addition to email.
- CSV export of the activity log.
Ekran Görüntüleri



Yükleme
- Install and activate Miroir on the remote (production) site.
- Install and activate Miroir on the local site.
- On the local site, open Miroir, add the remote URL and approve the connection.
SSS
-
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 withmanage_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.
İncelemeler
Bu eklenti için herhangi bir değerlendirme bulunmuyor.
Katkıda Bulunanlar ve Geliştiriciler
“Miroir Local Sync” açık kaynaklı yazılımdır. Aşağıdaki kişiler bu eklentiye katkıda bulunmuşlardır.
Katkıda bulunanlar“Miroir Local Sync” eklentisini dilinize çevirin.
Geliştirmeyle ilgilenir misiniz?
Kodu görüntüleyin, SVN deposuna göz atın ya da RSS ile geliştirme günlüğüne abone olun.
Değişiklik Kaydı
1.1.2
- Redesigned the live progress view (Push/Pull, shortcuts, comparison analyses): status chip with elapsed time, readable step labels, dimmed skipped steps and highlighted errors.
1.1.1
- Fixed the one-click Agent update: it now targets the plugin folder actually used on the remote site (announced by the Agent, wp.org slug as fallback) instead of a hardcoded name, and verifies the remote version after deployment (a failed update now reports failure instead of success).
1.1.0
- Background operations: Push/Pull now run in a detached server-side request (wp-cron spawn pattern) while the browser only polls progress, so strict shared-hosting proxies (60-120 s) can no longer kill a long sync. Automatic fallback to the previous synchronous mode when loopback requests are blocked.
- Scheduled shortcuts: each one-click deployment shortcut can now run automatically (hourly, twice daily, daily or weekly) via its own WP-Cron event, with anti-overlap lock and email/webhook notification. A clock chip on the dashboard shows the frequency.
- Settings screen reorganized into clear cards (Notifications, Database snapshots, Scheduled sync, Advanced), with the next scheduled run displayed, schedule fields dimmed while scheduling is off, and the live-data protection option shown only for push.
- Extension hooks for add-ons: sumotori_sync_run_args / sumotori_sync_after_run (every entry point), sumotori_sync_preset / sumotori_sync_after_preset, sumotori_sync_live_data_exclusions, sumotori_sync_webhook_payload, sumotori_sync_settings_sections / sumotori_sync_save_settings, sumotori_sync_site_menu.
- Typography cleanup across UI strings, readme and translations.
1.0.0
- Live data protection on push: new option (on by default with WooCommerce) that keeps the target’s orders (HPOS tables, order items, sessions, analytics lookups, reserved stock), users and comments/reviews untouched: push your local work to a live shop without clobbering what happened since.
- Scheduled sync: run a pull (or push) automatically via WP-Cron (hourly/twice daily/daily/weekly), with anti-overlap lock, last-run status, and email/webhook notification.
- WP-CLI commands:
wp miroir status,wp miroir compare,wp miroir push,wp miroir pull: for CI/CD pipelines and robust system crons. - Webhook notifications (JSON POST) after each real operation, alongside email.
- Incremental comparison: per-file hashes are now cached (invalidated by size+mtime), making repeat analyses near-instant on large sites.
- Force unlock: new action in the site menu to release the Agent’s operation lock immediately after an interrupted operation (previously a 30-minute wait).
- Daily cleanup of orphaned transfer files in the storage folder.
- CSV export of the activity log.
- Test suite for the search-replace engine (serialized PHP, escaped Gutenberg JSON, multibyte, idempotence, 21 assertions), runnable with
php tests/test-replace.php.
0.5.1
- Compatibility: tested up to WordPress 7.1.
- Multisite safety guard: Miroir now detects WordPress Multisite and disables all operations (admin UI, AJAX, and Agent REST endpoints) with a clear message: the full-database dump/import and search-replace engines are not designed for a network’s shared tables, so this prevents accidental data loss. Multiple separate production sites remain fully supported.
- Clarified the plugin description (“multiple separate production sites”) to avoid any confusion with WordPress Multisite.
0.5.0
- Internationalization: all source strings are now in English (the WordPress.org standard), so the plugin can be translated on translate.wordpress.org and the directory page reads consistently with the code.
- Bundled French translation (fr_FR) in /languages: the admin interface and the activity log display in French on French sites out of the box.
- Loads the bundled text domain on init (load_plugin_textdomain) so translations work on WordPress 6.0–6.6; 6.7+ auto-loads them.
- Included a translation template (miroir-local-sync.pot) for further locales.
0.4.11
- Progress transients: the literal prefix sumotori_sync_prog_ is now visible at every set_transient() call site (no more dynamic keys), so all options/transients are verifiably prefixed.
- Renamed the JS localized object MiroirSync to sumotori_sync_cfg (consistent unique prefix).
- Hardened storage confinement: chunk writes (Agent) and downloads (Transport) now refuse any path outside the protected storage folder under wp_upload_dir() (uploads/miroir-local-sync-{key}/). No data is ever written inside the plugin folder.
0.4.10
- Removed ini_set(‘display_errors’) from the AJAX guard (no error-reporting changes in production code).
- Progress transient key is now force-prefixed with sumotori_sync_ in the push/pull setters.
0.4.9
- Storage folder in uploads now uses the plugin slug prefix (miroir-local-sync-).
0.4.8
- Portability: use WP_PLUGIN_DIR and get_theme_root() instead of hardcoded WP_CONTENT_DIR paths. Correct readme contributor.
0.4.7
- Renamed to Miroir Local Sync (slug miroir-local-sync) for a distinctive, descriptive name.
0.4.6
- Text domain aligned to the plugin slug (miroir). Plugin Check fixes: escaped CTA button attribute, translators comment, composer.json kept in the package.
0.4.5
- Security hardening: search-replace unserialize restricted to stdClass (no object injection); transfer chunks now capped (size guard against disk-fill); manual connection validates the URL like the auto flow.
- i18n: Push/Pull button label no longer hardcoded after an operation.
0.4.4
- After synchronizing a component, its row status flips from “modifié” to “à jour” (kept visible until the next refresh).
0.4.3
- The site “⋯” menu now closes on outside click or Escape.
- Removed the per-component “Détails” button (the (i) panel covers it).
0.4.2
- Comparer: clickable (i) on each component reveals file/size details below the row; “N components up to date” collapsible to find any already-synced component.
- Per-component detail now includes total size (LOCAL/PROD files + size).
0.4.1
- Per-component “Synchroniser” button on the Comparer page: push a single plugin/theme to prod in delta, with a live per-phase spinner.
- Component versions shown per side (LOCAL vX · PROD vY); file-count detail moved to an (i) tooltip to keep rows clean.
- Consistent “Synchroniser” terminology across components and database.
- Manifest hardening: version “0” handled, null-safe count/size reads.
0.4.0
- Delta deployment: one-click shortcuts now send only changed files (hash diff vs the remote), ~90% less data on the wire.
- Comparer page redesigned into per-category cards: including in the sync and expanding the detail are now decoupled (inspect without checking).
- Local and remote analysis run in parallel (~2x faster), with live per-phase progress.
- Lightweight component signature (version + size + file count) for an instant overview; exact per-file hashing kept for drill-down and deployment.
- Dashboard redesigned: centered layout, compact collapsible “add a site” tile, denser sections.
- Fixes: shortcut edit/delete (id casing), Comparer scope now actually filters, raised memory limit for heavy operations.
0.3.0
- Editorial content merge by post type.
- One-click deployment shortcuts.
- Per-component file deployment and one-click agent update.
0.2.0
- File synchronization, SFTP transport, per-component diff, AJAX progress.
0.1.0
- Initial connection flow, database push/pull, search-replace engine.
