wp_create_post
Creates a new WordPress post with validation, supporting drafts, scheduling, categories, tags, and featured images. Returns success feedback with management links for easy editing.
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. |