Skip to content

Change History and rollback

EMCP records supported mutations in a shared History ledger. Coverage is operation-specific: a recorded entry can be informational, reversible, or unavailable for automatic undo. Builder-native revisions and adapter recovery snapshots are separate mechanisms.

Version 3.17.0 adds creation undo for Elementor pages and uploads, records page settings and CSS, and strengthens rollback checks. It does not reconstruct changes omitted by older versions or make every builder operation reversible.

All three require manage_options and are enabled by default.

ToolInputsPurpose
emcp-tools/list-changesOptional domain, rolled_back, reversible, limitList recent recorded changes without heavy snapshot payloads
emcp-tools/get-changeidRead one entry and its recovery details
emcp-tools/rollback-changeid, optional forceAttempt verified restoration for an eligible entry

Read the live schema and entry before undoing. Listings explain why an entry is unavailable for automatic rollback; retained snapshots can still support inspection.

  • Elementor page creation: create-page records one creation event including initial content and returns change_id. Undo removes the created page rather than reverting only its initial content.
  • Uploaded media: upload-media returns a creation change ID. Undo checks for later attachment or file changes, removes the attachment and verifies deletion of recorded WordPress-managed files, including generated sizes on Windows.
  • Page settings and CSS: exact prior metadata is retained, including absent values and escaped CSS. Identical CSS saves do not add duplicate records. Restoration invalidates Elementor caches.
  • Conflict checks: guards cover the state changed by the operation, including metadata, taxonomies, users and ACF. Unrelated post-field edits are preserved.
  • Verified restoration: failed writes, missing file backups, occupied IDs and ledger persistence failures do not report ordinary rollback success.

A later edit can prevent rollback when the current target differs from the recorded after-state. Inspect that difference before deciding whether to proceed. force is not a bypass for incomplete snapshots or missing recovery data.

Incomplete database snapshots without verified row identity and after-state, older post snapshots without complete guards, and generic attachment-deletion records without file backups refuse automatic undo even with force. A successful rollback requires a supported recovery contract and verification of the restored result.

Open EMCP Tools → Safety → History (admin.php?page=emcp-tools-history). The header counts the recorded changes and how many were rolled back. The screen was rebuilt in 3.18.0 around sessions, undo and a difference view. The full screen guide is History.

Changes are grouped into sessions, newest first. A session is one connected client’s MCP session, one AI Chat conversation, or, for older changes without a session, the changes one user and client made within 30 minutes. A change made in wp-admin (for example a redirect you edited) is its own group. Each session shows its first change, a client badge (such as ADMIN, WP-CLI, AI Chat or an OAuth app name), the number of changes and the time.

Inside a session each row shows an icon for the kind of change, its title, the target, the action (create, update or delete) and a relative time. Show more changes loads the rest of a large session, and Load older sessions at the end of the list loads the next page.

  • Undo on a row restores that one change. If the target changed since the change was recorded, the screen asks “This changed since …” and offers Undo anyway, which is the same as force: true on rollback-change. The same refusals apply: an entry without a complete recovery record cannot be undone, even anyway.
  • Undo whole session (with a confirmation) undoes every change in the session, newest first, and stops at the first change that cannot be undone.
  • Undone rows carry a Rolled back badge. The undo itself is also recorded, so History shows what happened.
  • The bin icon (Delete from History) removes one entry from the list without changing the site.

Choose the eye button on a row to open View difference: a line diff of the saved before-state against what is there now. Elementor data and options show as formatted JSON, post fields and meta as text sections, and files as text. Some changes have no preview, and the panel then says why, for example “This kind of change has no preview.”, “The content is larger than 256 KB.” or “This file is binary.”.

Use Search changes, the kind tabs All / Content / Design / Settings, the Client menu (All clients, or one client seen in the log) and the Time range menu (All time, Last 24 hours, Last 7 days, Last 14 days, Last 30 days). Sessions with no matching change are hidden.

The Retention menu in the header keeps changes for 30, 90, 180 or 365 days (default 90); older entries are pruned daily, and an expired entry can no longer be undone. Clear history deletes every entry and its undo record after you type CLEAR to confirm. This cannot be undone. History is not a substitute for a site backup.

A banner at the top of History appears when something needs attention:

  • “Some changes are missing from History”: a change could not be recorded (for example under heavy contention). Dismiss it once you have checked.
  • “Reconnect your AI client”: a client still runs the code from before 3.18.0, so its changes are not recorded. Restart the client or reload its MCP server.
  • “History is using its compatibility store” and “History could not finish its upgrade”: the 3.18.0 move of History to its own database table has not completed. These cannot be dismissed and clear themselves once the upgrade finishes.

The Dashboard’s Recent changes card shows the five newest changes with the same Undo button and a View history link.

The dedicated media deletion workflow can preserve original files, generated sizes, post data and metadata in a managed backup before permanent deletion. Recovery depends on that complete backup and an available original ID. WordPress media Trash, when used, follows its own trash/untrash lifecycle.

A generic attachment-deletion snapshot does not necessarily contain files. Inspect the entry rather than assuming every deleted attachment can be restored. Missing backups or occupied IDs prevent restoration.

Use each builder reference for native revision, staging and snapshot tools. A native revision may cover page content without covering global settings or template conditions. For example, Oxygen uses additional snapshots for template settings and global design documents.

Content Mirror provides file-based exports for longer-lived, diffable history. The ledger is an in-database record kept for the retention period you choose. Full site recovery still belongs to your backup workflow.