search_replace_execute
Execute site-wide content replacements across all pages in LightCMS. Modify text globally with optional regex support and automatic republishing.
Instructions
Execute a site-wide search-and-replace across all content. Modifies every matching page permanently.
MANDATORY workflow:
Run search_replace_preview and show the user which pages will be affected.
Get explicit user confirmation before executing.
Run search_replace_execute with a clear version_comment.
Set auto_republish: true to immediately re-publish all previously-published pages after updating them, collapsing the execute + publish_multiple flow into one call.
For targeted replacements, use scoped_search_replace_execute instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto_republish | No | If true, re-publish all previously-published pages immediately after updating them (saves a separate publish_multiple call) | |
| regex | No | If true, treat search as a Go regular expression. Use $1, $2 for capture group references in replace. | |
| replace | Yes | Text to replace with,required | |
| search | Yes | Text to search for,required | |
| version_comment | No | Comment for version history (defaults to 'Bulk search and replace') |