30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Patch Elementor Document Data

elementor/patch-data finds and replaces text within an Elementor document’s serialised JSON.

Because it operates on the raw string, it updates text in any control in one pass — headings, text editors, buttons, image alt text, everything.

Before you run it

This operates on the raw serialised JSON, which means it replaces matches anywhere: visible copy, but also URLs, CSS class names, control keys and anything else that happens to contain the string. A short or common search term can rewrite parts of the document nobody intended, and a replacement that breaks the JSON structure produces a document the editor cannot open. There is no undo. Search first with elementor/find-elements.

At a glance

Abilityelementor/patch-data
ToolsetElementor — toolset/elementor
GroupElementor › Documents
RequiresElementor, active on the site
Capabilitymanage_options
SafetyDestructive — a find-and-replace across the whole serialised document. No undo.
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

Changing a company name across a page built in Elementor means finding it in every widget that contains it, and those widgets store it under different keys — a heading’s title, a text editor’s editor, a button’s text, an image’s alt attribute.

Walking the tree to find them all is real work. Replacing on the serialised string finds them all at once.

It also finds them everywhere else. A string that appears in a URL, a CSS class, or a control key is replaced just the same, and the shorter the search term the more likely that is.

So the rule is: search first, know how many matches there are and where, then replace. elementor/find-elements with a text filter answers that.

Case-sensitive, which is usually what you want for a proper noun and a trap for anything else.

Not idempotent in a useful sense — the second run finds nothing, having already replaced everything.

Elementor generates a CSS file per post and caches it. A change to the document does not change the rendered page until that CSS is regenerated, which is why elementor/clear-cache is the second half of several operations here.

Input

NameTypeRequiredWhat it is
post_idintegerYesThe post holding the Elementor document.
searchstringYesThe text to find. Case-sensitive.
replacestringYesWhat to replace it with.

What comes back

NameTypeWhat it is
post_idintegerThe post written.
replacementsintegerHow many occurrences were replaced.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Change every mention of the old product name on this page.

It resolves to one call:

{
  "ability": "elementor/patch-data",
  "parameters": {
    "post_id": 412,
    "search": "Orbit Pro",
    "replace": "Orbit Studio"
  }
}

Worth knowing

  • Matches anywhere in the serialised document, including URLs and class names.
  • Search first and count the matches.
  • Case-sensitive.
  • No undo beyond a post revision.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading