wp_delete_media
Delete a media file from the WordPress media library by ID. Optionally force permanent deletion to free up storage space.
Instructions
Delete a media file from the WordPress media library.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Media attachment ID | |
| force | No | Permanently delete (default: false) |