Update WordPress Post
wp_update_postUpdate an existing WordPress post by ID, changing only the fields you provide (title, content, slug, status, etc.) while preserving others. Supports large content via a local file path.
Instructions
Update an existing post. Only the fields you pass will change; omitted fields preserve their current values.
Args:
id (number): Post ID to update. Required.
title, content, excerpt, slug, status, author, featured_media, date, categories, tags: all optional, same shape as wp_create_post.
content_path (string): Optional. Absolute local file path; its contents become the post content (for bodies too large to pass inline). Overrides 'content'.
response_format (enum): markdown | json. Default 'markdown'.
Returns: The updated WPContentItem.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Post ID to update. | |
| date | No | Publish/schedule date in ISO 8601 (e.g. '2026-05-15T10:00:00'). For scheduling, also set status='future'. | |
| slug | No | URL slug. WP auto-generates from title if omitted on create. | |
| tags | No | Tag IDs to assign. Replaces existing on update. | |
| title | No | Post/page title (plain text). | |
| author | No | Author user ID. Defaults to the authenticated user on create. | |
| status | No | Status: publish | future | draft | pending | private. Default 'draft' on create. | |
| content | No | Post/page HTML content. Send <p>, <h2>, <a>, <img>, etc. WP renders inline. | |
| excerpt | No | Short summary shown on archive/listing pages. | |
| categories | No | Category IDs to assign. Replaces existing on update. | |
| content_path | No | Absolute path to a local file (on the machine running this MCP) whose UTF-8 contents become the post 'content'. Use for bodies too large to pass inline. Overrides 'content' if both are given. | |
| featured_media | No | Featured image media ID. Use 0 to unset. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |