Delete a post / page
wp_delete_contentDelete a WordPress item by ID: move to trash for recovery or permanently erase with force. Works for posts, pages, and custom types.
Instructions
Move an item to trash (recoverable). Pass force: true to delete permanently — that cannot be undone, so confirm with the user first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| site | No | Configured site name. Omit to use the default site. | |
| force | No | true = permanent, irreversible delete. Default trashes instead. | |
| post_type | No | Post type slug, e.g. post, page, or a custom type. | post |