Governed ability
Replace text in a WPBakery page
aafm/wpbakery-replace-textGuarded write
Replace text in a WPBakery page is a governed WPBakery Page Builder ability in Agent Abilities for MCP, a free WordPress plugin that runs an MCP server on your site.
Replaces literal text within a WPBakery page while requiring the shortcode structure and every attribute value to stay the same before and after (quoting style and whitespace inside a tag are not part of this guarantee). Text that WPBakery keeps in an element's settings, such as a heading or a button label, cannot be changed here and is refused, as is any replacement that would add, remove or alter an element. Only a user who may post unfiltered HTML can put square brackets, percent-encoded brackets or data-* attributes in body text, and even then text that would add an element is refused. If saving the page as this user would remove or change elements, or change other content on the page, the call is refused and nothing is saved. Not undoable from this plugin's change history; WordPress keeps a revision when revisions are on. Requires edit access to the post; WPBakery's Role Manager settings are not applied. Only while WPBakery Page Builder is active.
How it is governed
The same model as every ability in the plugin, stated for this one.
- Off until you enable it
Like every ability, Replace text in a WPBakery page ships switched off. You turn it on one at a time, and an update never switches on a tool it serves.
- Guarded write
Writes stay conservative, and the plugin re-checks the capability before the call runs.
- Capability gated
A connection only sees Replace text in a WPBakery page if the user you connected can run it, and the plugin checks that capability again before it executes.
- Every call audited
The call is written to the log in your own database, denials included, with the argument keys and the identifiers it touched, never free-text content.
Replace text in a WPBakery page is one of the 12 governed WPBakery Page Builder abilities. See the full WPBakery Page Builder MCP integration.
See it in action
An illustrative run. Your real calls and data stay on your own site.
Try it with a prompt
Example requests you could paste to your agent.
On page 57, replace every 2025 with 2026 in the body text.
Change the phone number written in the text blocks of page 57.
These are illustrative example prompts. The agent runs them as the user you connected, checked against that user's capabilities and written to your audit log.
Frequently asked
Short answers for Replace text in a WPBakery page.
Why was my heading change refused?
Text WPBakery keeps in an element's settings, such as a heading or a button label, cannot be changed here. Update a WPBakery element changes those.
Can I undo it?
Not from the Changes tab, which does not record this tool. WordPress keeps a revision when revisions are on.
Governed by default, from the first call.
Replace text in a WPBakery page is off until you enable it, scoped to the user you connect, and logged like everything else. Turn on only what you need.
Every ability off until you enable it, capability-gated on every call.