wp_edit_page
Edit WordPress pages by creating a draft duplicate, applying changes like updating sections or attributes, and optionally publishing after review.
Instructions
Edit an existing page via a draft duplicate (the live post is never written).
Ops (list of dicts): update_element, set_attr, insert_section, insert_module, remove_element, duplicate_element. DEFAULTS TO dry_run=true (returns a preview, writes nothing). Pass dry_run=false to stage the edit onto a draft duplicate; promote it later with wp_publish_swap. Requires a profile (wp_discover_site) and an editable builder (Divi 4/5 or Gutenberg). Prod writes require allow_prod=true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"install": "<install>",
"post_id": "<post_id>",
"ops": "<ops>"
},
"name": "wp_edit_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | ||
| dry_run | No | ||
| install | Yes | ||
| post_id | Yes | ||
| allow_prod | No |