Skip to content

Change History & Rollback

New in v3.3.0. Every AI-made mutation (Elementor page edits, filesystem writes, database writes) is recorded to one change ledger, and any recorded change can be undone. This is the “safety spine” that makes the write tools trustworthy: an agent (or you) can review recent changes and roll a bad one back.

Three tools, all manage_options, always-on, enabled by default. Plus a human-facing History admin tab.

Lists recent changes newest-first, each with a summary, whether it’s reversible, and whether it’s already been rolled back.

Input: domain (elementor/filesystem/database), rolled_back, reversible, limit, all optional filters. Returns: { changes: [ { id, ts, user_login, domain, action, target, summary, reversible, rolled_back } ], total }. Heavy payloads (before-images) are stripped from the list. Read them with get-change.

Returns one entry’s full detail by id, including its rollback reference (the before-image / backup pointer).

Input: id.

Undoes one recorded change by id, dispatching on its type:

  • Elementor → re-saves the page’s prior _elementor_data
  • Filesystem → restores the file from its backup (or deletes a created file)
  • Database → inverses the write from its before-image (re-update / re-insert / delete)

It marks the entry rolled back (no double-rollback) and records a compensating entry. It only ever reverts changes EMCP itself recorded.

Input: id.

EMCP Tools → History surfaces the same ledger for a human: a table of every change (when · who · type · summary · target) with a one-click Roll back button per reversible entry, plus domain filters. No MCP client needed. You can review and undo AI edits straight from wp-admin.

Rollback covers the three domains that capture a “before” today (Elementor / filesystem / database). The ledger is capped by count and size, so the oldest entries age out (a dropped entry can’t be rolled back; the list shows this). Broad dry-run/preview and media/settings rollback are planned follow-ups.

Change history is an in-database ledger of recent changes with instant undo. The Content Mirror is the complementary file-based history: durable, diffable, git-trackable JSON exports for external version control. Use the ledger for quick undo; use the mirror for long-term, VCS-managed history.