wp_update_post
Update an existing WordPress post by ID, modifying only provided fields with validation and change tracking.
Instructions
Updates an existing WordPress post with comprehensive validation and change tracking. All parameters except ID are optional - only provided fields will be updated.
Usage Examples:
• Update title: wp_update_post --id=123 --title="New Title"
• Update content: wp_update_post --id=123 --content="<p>Updated content</p>"
• Change status: wp_update_post --id=123 --status="publish"
• Update categories: wp_update_post --id=123 --categories=[1,5,10]
• Set featured image: wp_update_post --id=123 --featured_media=42
• Remove featured image: wp_update_post --id=123 --featured_media=0
• Multiple updates: wp_update_post --id=123 --title="New Title" --status="publish" --categories=[1,2]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | The ID of the WordPress site to target (from mcp-wordpress.config.json). Required if multiple sites are configured. |