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
| Ability | elementor/patch-data |
| Toolset | Elementor — toolset/elementor |
| Group | Elementor › Documents |
| Requires | Elementor, active on the site |
| Capability | manage_options |
| Safety | Destructive — a find-and-replace across the whole serialised document. No undo. |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI 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
| Name | Type | Required | What it is |
|---|---|---|---|
post_id | integer | Yes | The post holding the Elementor document. |
search | string | Yes | The text to find. Case-sensitive. |
replace | string | Yes | What to replace it with. |
What comes back
| Name | Type | What it is |
|---|---|---|
post_id | integer | The post written. |
replacements | integer | How many occurrences were replaced. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present 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
- Find Elementor Elements — count the matches first
- Replace URLs in Elementor Documents — the site-wide version, with a dry run
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category