publish_to_wordpress
Publish or update WordPress posts, pages, and custom post types via REST API with SEO metadata, defaulting to draft status for safe review.
Instructions
Publish or update content on WordPress via REST API. Supports posts, pages, and custom post types. Includes Yoast SEO metadata (title, description, focus keyword). Requires WordPress Application Password for authentication. Defaults to 'draft' status for safety.
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": {
"siteUrl": "<siteUrl>",
"conversationId": "<conversationId>",
"title": "<title>",
"content": "<content>"
},
"name": "publish_to_wordpress"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | URL slug. | |
| tags | No | Tag IDs. | |
| title | Yes | Post title. | |
| author | No | Author user ID. | |
| postId | No | If provided, updates an existing post instead of creating a new one. | |
| status | No | Post status. Defaults to 'draft' for safety. | draft |
| content | Yes | Post content (HTML). | |
| excerpt | No | Post excerpt. | |
| ogImage | No | Open Graph image URL. | |
| ogTitle | No | Open Graph title for social sharing. | |
| siteUrl | Yes | WordPress site URL (e.g., https://example.com) | |
| postType | No | Post type endpoint: 'posts', 'pages', or custom post type slug. | posts |
| seoTitle | No | SEO title (meta title). Works with Yoast, Rank Math, and AIOSEO. | |
| username | No | WordPress username for Basic Auth. | |
| categories | No | Category IDs. | |
| ogDescription | No | Open Graph description. | |
| conversationId | Yes | The conversation ID obtained from learn_wordpress_api. | |
| seoDescription | No | SEO meta description. | |
| featuredImageId | No | Featured image (attachment) ID. | |
| seoCanonicalUrl | No | Canonical URL override. | |
| seoFocusKeyword | No | Focus keyword / keyphrase. | |
| applicationPassword | No | WordPress Application Password for auth. |