wp_upload_media
Upload files to WordPress media library from local storage. Specify file path, title, alt text, caption, description, and attach to posts.
Instructions
Uploads a file to the WordPress media library.
Input Schema
TableJSON 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. | |
| file_path | Yes | The local, absolute path to the file to upload. | |
| title | No | The title for the media item. | |
| alt_text | No | Alternative text for the media item (for accessibility). | |
| caption | No | The caption for the media item. | |
| description | No | The description for the media item. | |
| post | No | The ID of a post to attach this media to. |