Active Projectv1.1.37

EZ Page Sync

Push page edits from a staging WordPress instance to production with cryptographic validation, automatic media sideloading, and database rollback checkpoints.

Visit ezpagesync.com

Overview

EZ Page Sync is a database-level, security-hardened WordPress plugin designed to sync content changes from staging environments to production in one click. It maps post assets, remaps links, and migrates layout files without needing complete database exports or manual search-and-replace queries.

HMAC Cryptographic Security

Every synchronization payload is signed using SHA-256 HMAC tokens. Replay attacks are stopped using time-to-live nonces, rate-limiting locks, and whitelisted IP addresses.

Automatic Rollback Snapshots

Before applying updates, the receiver backs up the existing target page. If anything fails (like media sideloading or ACF mismatches), it triggers an automated rollback.

Key Features

1

Full & Content-Only Sync

Choose between syncing everything (meta, ACF, media attachments, layouts) or push purely textual revisions (slug, title, body markdown) using "Content Only" selectors.

2

Dry Run Mode

Execute the entire synchronization pipeline—from validation schemas to media processing—without saving to the database. Displays a preview diff summary.

3

Url Rewriting

Rewrites references to the staging URL found inside your HTML blocks, custom fields, and layout configurations to use the production URL on arrival.

4

Media Sideloading

Extracts featured images and inline attachments from the post body. They are compressed, sent via secure base64 payloads, and sideloaded into the production library. Run Image Format Converter on the receiver to convert those sideloaded images to WebP/AVIF the moment they land.

5

ACF & Elementor Remapping

Parses Advanced Custom Fields (ACF) meta arrays and Elementor page configurations (_elementor_data), mapping referenced media IDs to the production media library.

6

Cache Clearing

Automatically clears cached instances of modified pages for common setups, supporting WP Rocket, LiteSpeed Cache, W3 Total Cache, and WP Super Cache.

How It Works

EZ Page Sync securely transfers data across environments. The staging server compiles and signs the payload, while the production server validates it, creates a backup snapshot, and saves the updates.

Pipeline A

Outbound Dispatch Pipeline (Sender)

1
Action Trigger

An editor clicks "Sync" or "Preview" inside the page metabox, or pushes pages in bulk from the dashboard.

2
Payload Construction

Sender::build_payload() queries the page, custom post meta, taxonomies, ACF fields, and base64 media blocks.

3
HMAC Signature

The compiled JSON is signed using SHA-256 HMAC using the API secret key, adding a one-time nonce and timestamp.

4
REST Request

The package is sent over HTTPS to the production receiver's registered endpoint via wp_remote_post().

Pipeline B

Inbound Processing Pipeline (Receiver)

1
Security Verification

Receiver::verify_request() performs whitelisting checks, verifies rate limits, and validates the HMAC signature.

2
Snapshot Checkpoint

If the target page already exists, Rollback::create_snapshot() saves its current state in the custom logs table.

3
Application & Sideloading

The post data is updated. Base64 media data is written to disk, re-indexed, and local URLs inside the content are remapped.

4
Purge & Response

Page caches are cleared, a success code is returned to the sender, and the sync event is logged in the custom logs table.

Sync Architecture

This flowchart illustrates how the sender and receiver coordinate sync actions using the REST API:

staging (Sender)─────────────────EzPageSync\Sender
  • └─ build_payload()
  • └─ sign (HMAC-SHA256)
  • └─ wp_remote_post()──►
production (Receiver)────────────────────EzPageSync\Receiver
  • └─ handle_sync()
  • ├─ verify_request()
  • ├─ validate_payload_schema()
  • ├─ create_snapshot()
  • ├─ find_or_create_production_post()
  • ├─ apply_post_update()
  • ├─ sync_post_meta()
  • ├─ sync_media() ← EzPageSync\Media_Sync
  • ├─ sync_acf_fields()
  • ├─ sync_taxonomies()
  • ├─ sync_yoast_meta()
  • └─ log_sync_success()

Technical Component Breakdown

File/Class ComponentRole & Functionality
EzPageSync\SenderHandles outbound sync. Queries metadata, maps dependencies, compiles JSON payloads, calculates HMAC signatures, and manages the admin metabox.
EzPageSync\ReceiverHandles incoming payloads. Validates formatting, resolves post matches on production, maps media IDs, and writes changes to the database.
EzPageSync\AuthHandles HMAC validation, checks replay attack nonce tables, validates timestamp bounds, checks whitelisted IPs, and manages rate limiting.
EzPageSync\Media_SyncHandles binary attachments. Converts inline images to base64, uploads them to the media library on the receiver, and rewrites URLs in content.
EzPageSync\RollbackTracks checkpoints. Serializes posts and meta keys into a custom database table before sync, and handles restoration if errors occur.
EzPageSync\LoggerManages the custom wp_ez_ps_logs table. Logs events and handles automated pruning based on the configured log limits.

Free vs Premium Feature Matrix

The Free version supports basic content sync for one destination, while the Premium version adds support for custom post types, page builders, and media sideloading.

FeatureFree TierPremium Tier
Sync Destinations1 SiteUnlimited (Multi-destinations & Relay Chains)
Plugin RoleSender OR Receiver (Fixed)Both (Multi-role simultaneously)
Eligible Post Typespage, postAny registered Custom Post Type (CPT)
Metadata & Custom FieldsIncluded (ACF, Yoast, Astra theme options)
Page-Builder SupportIncluded (Elementor layout, global widgets & templates)
Media HandlingIncluded (Featured image & inline body media)
Batch Bulk SyncIncluded (Multi-select push from dashboard)
Rollback ManagerIncluded (Full snapshot history and restore controls)

Configuration Reference

Setting KeyRole ScopeDefaultDescription
ez_ps_roleBoth'sender'Role assignment: 'sender' (staging) or 'receiver' (production).
ez_ps_api_keyBothShared API Secret Key for HMAC signatures. Stored encrypted in DB.
ez_ps_allowed_ipsReceiver''Comma-separated sender IP addresses or CIDR blocks. Empty matches all.
ez_ps_sync_post_typesBoth'page, post'Comma-separated list of post types eligible for synchronization.
ez_ps_overwrite_mediaReceiverfalseIf true, overwrites target media library files if duplicate filenames are found.
ez_ps_auto_rollbackReceivertrueAutomatically restores post snapshots if error exceptions throw mid-sync.
ez_ps_require_snapshotReceivertrueAborts sync operations if backup snapshot generation fails.
ez_ps_max_log_entriesBoth500Caps rows in custom log tables, pruning oldest entries first.
ez_ps_notify_emailReceiver''Recipient email address for automated status alerts.

Frequently Asked Questions

Does this plugin support WordPress Multisite?

No. Version 1 of the plugin is designed strictly for single-site WordPress installations.

How does the rollback system restore pages?

Before applying any incoming sync payload, the receiver serializes the existing post fields and metadata rows, saving them as an entry in the custom logs table. You can restore this version with one click in the **Rollback Manager** tab on the receiver site.

What happens during a "Dry Run"?

Dry Run runs the entire validation, media parsing, and payload delivery process, but rolls back database changes on the receiver at the end. This allows you to verify that dependencies resolve without saving changes to the live site.

How do I rotate key credentials safely?

Go to **EZ Page Sync → Settings** and click **Regenerate Key**. You must copy the new key to the other environment immediately. Any pings or sync requests sent using the old key will be rejected.

Why are debug messages not written to the Sync Log?

To prevent database bloat. Verbose logs and connection checks are routed directly to PHP's standard error logs (visible in your server logs when `WP_DEBUG_LOG` is enabled). The database log table is reserved for events like successful syncs, failures, and rollbacks.

Changelog

v1.1.37

July 3, 2026

Free-Tier Safety & Reset Locks:

  • Fixed role locks on Free tier. The Admin::has_incoming_sync_history() check now tracks receiver connection pings using the ez_ps_receiver_last_contacted_at option, preventing role changes if a sender has established a connection.
  • Fixed options cleanup. Resetting a receiver now deletes ez_ps_receiver_last_contacted_at alongside metadata keys to allow re-purposing the site as a sender.
  • Expanded PHPUnit coverage with new test assertions for options gating and reset actions.

v1.1.36

July 3, 2026

API Key Rotation & Hardened Disconnection:

  • Updated `Reset Sync Origin` to regenerate the API key when disconnecting. This prevents stale senders from re-establishing ownership after metadata resets.
  • Updated settings interface to display the rotated key alongside confirmation prompts immediately after resets.
  • Added validation checks to confirm the reset actions are restricted to administrators (manage_options).

v1.1.35

July 3, 2026

Free-Tier Receiver Locking:

  • Locked the plugin role toggle on the Free tier when the site has received incoming sync entries, preventing accidental disruption of active staging senders.
  • Added server-side sanitization to reject role modifications if role-change lock criteria are met.