wp_create_post
Create a WordPress post with customizable title, content, status, categories, tags, featured image, and scheduling. Returns detailed success feedback and management links.
Instructions
Creates a new WordPress post with comprehensive validation and detailed success feedback including management links.
Usage Examples:
• Simple post: wp_create_post --title="My New Post" --content="<p>Hello World!</p>"
• Draft post: wp_create_post --title="Draft Post" --status="draft"
• Categorized post: wp_create_post --title="Tech News" --categories=[1,5] --tags=[10,20]
• Post with featured image: wp_create_post --title="My Post" --content="<p>Content</p>" --featured_media=42
• Remove featured image: wp_create_post --title="My Post" --featured_media=0
• Scheduled post: wp_create_post --title="Future Post" --status="future" --date="2024-12-25T10:00:00"
• Complete post: wp_create_post --title="Complete Post" --content="<p>Content</p>" --excerpt="Summary" --status="publish"
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. | |
| title | Yes | The title for the post. | |
| content | No | The content for the post, in HTML format. | |
| status | No | The publishing status for the post. | |
| excerpt | No | The excerpt for the post. | |
| categories | No | An array of category IDs to assign to the post. | |
| tags | No | An array of tag IDs to assign to the post. | |
| featured_media | No | The ID of the featured media (image). Use 0 to remove featured media. | |
| date | No | The date the post was published, in the site's timezone (ISO 8601 format). |