Delete content
delete_contentDelete any WordPress content by ID, sending it to the trash for recovery by default. For permanent removal, set force and confirm to true to erase the row and its meta from the database.
Instructions
Delete content of any type. By default it goes to the trash and stays recoverable from wp-admin. Permanent deletion requires force: true AND confirm: true, and cannot be undone — the row is removed from the database along with its meta.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The content ID to delete. | |
| type | No | Content type of that ID. | post |
| force | No | Skip the trash and delete permanently. Requires confirm: true. | |
| confirm | No | Explicit acknowledgement, required only for permanent deletion. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. |