Roll back an Avada or WPBakery page edit

ContentBeginner~5 min

Before you start

Plugin version 1.12.0 or newer, with the builder that owns the page (Avada or WPBakery Page Builder) still active. Restore revision is a write and is off until you switch it on. The agent needs edit access to the page. WordPress revisions must be on for it; some plugins, GeoDirectory among them, switch them off for the whole site, and a WP_POST_REVISIONS line in wp-config.php turns them back on. A site that keeps only one revision per post deletes the restore point during the same save; the write then returns reversible_reason instead of restore_revision_id.

The agent changed the hero on your Avada home page an hour ago, and now the client wants the old version back. Builder edits made through this plugin are not in the Changes tab, but each element, template and Library write keeps a WordPress revision when revisions are on, and its response names it as restore_revision_id. That id is the fastest way back. A WPBakery text replace names none, so list the page’s revisions to find the one before it.

If you no longer have the id, the page’s revision history works the same way.

The prompt
I want the [Home] page (id [5]) back the way it was before [this morning's
hero edit].
If you still have the restore_revision_id from that edit, use it. If not, list
the page's revisions with list-revisions, with their dates and who saved them,
and help me find the last one before the edit. Show me that revision's content
with get-revision using content_format raw and with_diff true, and tell me whether the
title or excerpt differ, since the restore brings those back too.
Wait for my go. Then restore it with restore-revision. Afterwards, read the
page again with the builder's page content tool and include_structure, and
confirm the outline matches the revision. If the restore is refused, tell me
the reason it gives.

Why this is safe to run

Listing and reading revisions are reads, so you check the exact content you are bringing back, with a diff, before anything changes. The restore itself is reversible: it saves the current live state as a fresh revision first, so a wrong pick is undone by restoring forward to that new point, and nothing in the history is deleted.

For a builder page the plugin adds a check of its own. It refuses a restore when saving the revision as this user would change it or the current page, for example by stripping an element or an embed that user may not keep, and it refuses a revision made with the other builder. After a WPBakery restore the page’s generated CSS is rebuilt, and if that fails the tool says the CSS may be stale.

Restore revision is off until you enable it, is checked against the edit access of the user you bound the agent to, and lands in the Activity Log with the page it changed. For posts and pages without a builder, the general undo a bad edit by restoring a revision recipe covers the same flow.

Already connected? Ask your agent for the “roll back a page builder edit” recipe, name the page and roughly when it went wrong, and it runs the same read-first flow on your own site.

How it works

  1. Find the revision: the restore_revision_id from the edit, or the last good one in the page's history.
  2. Show that revision with a diff against the live page.
  3. Wait for you to confirm.
  4. Restore it, which first saves the current state as a new revision.
  5. Read the page outline again to confirm the layout is back.

Questions

Does this work on other page builders?
No. Restore revision works on Avada and WPBakery pages while that builder is active, because both keep the whole layout in the post content. Pages owned by the other builders, such as Elementor or Divi, are still refused, since a restore there would have no visible effect or would corrupt the builder's stored layout.
Why was my restore refused?
An Avada or WPBakery restore is refused when saving the revision as this user would change it or the current page, for example by removing an element or an embed the user may not keep. A revision made with the other builder, such as a WPBakery revision of a page Avada owns now, is refused too. And every restore is refused when revisions are off for the page, because the current state could not be saved first.
What about page CSS, page options and settings?
Those writes keep no revision. They return the old value as previous instead, and sending it back is how you undo them.