MCP tool · Applications
manage_wp_content
List, read, create, update or trash the pages and posts of one WordPress site over WP-CLI.
manage_wp_content
Description
List, read, create, update or trash the pages and posts of one WordPress site over WP-CLI. action=list returns items[] {id, title, slug, status, type, date, modified, url} (filter with type page|post|any, status, search, limit); get needs id and adds item.excerpt and item.content — the page's full block html. list/get need only read:hosting; create (needs title; content is block html; status defaults to draft), update (needs id plus any of title, content, status, slug, excerpt) and trash (needs id) require write:hosting. To change text on a page: get it, edit the block html, then update with the full content — keep every <!-- wp:… --> and <!-- /wp:… --> block comment, or the editor shows the page as broken.
Input
| Name | Type | Description |
|---|---|---|
input
required
|
string |
A domain, email address, website URL, numeric service id, or hosting-account username the customer actually owns. Resolved to the owning account automatically; the resolved target is echoed back in the response.
|
action
required
|
enum |
list pages/posts, get one with its full content, create one, update one, or trash one (reversible). create/update/trash require write:hosting. One of list, get, create, update, trash.
|
id
|
integer |
The page or post id for get, update and trash. From list → items[].id; never guessed.
|
type
|
enum |
For list: which items (page, post or any; default page). For create: page or post (default page). One of page, post, any.
|
status
|
string |
For list: filter by publish, draft, pending, private, future, trash or any (default any). For create/update: publish, draft or private (create defaults to draft).
|
search
|
string |
For list: a free-text filter on title and content (max 100 characters).
|
limit
|
integer |
For list: the most items to return, 1–100. Omit for the site default.
|
title
|
string |
The item title — required for create, optional for update (max 200 characters).
|
content
|
string |
The full block html of the item for create/update, with its <!-- wp:… --> block comments (max 80 KB). On update it replaces the whole body — send everything, not a fragment.
|
slug
|
string |
The URL slug (om-oss): lower-case letters, digits and hyphens, max 100. Optional; WordPress derives one from the title otherwise.
|
excerpt
|
string |
An optional short summary for create/update (max 500 characters).
|
path
|
string |
Optional subfolder of a WordPress install not at the domain root (e.g. blog).
|