Delete an uploaded file
wp_delete_upload_fileDelete one file from the uploads directory (wp-content/uploads). Returns deleted, file and undo (token for wp_undo that puts the file back; null when no undo point could be recorded, e.g. undo switched off or the file too large, and the delete still happens). Only the file goes: a media library entry pointing to it stays. Folders and AlphaBridge's own folders are refused. Administrators only (manage_options). Attachments together with their files are deleted by wp_delete_media. Forwarded by AlphaBridge Connect to the one site this connection reaches.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>"
},
"name": "wp_delete_upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path of one file relative to the uploads directory, e.g. "2026/07/old.pdf", as wp_list_uploads lists it; ".." and symlinked files are refused. |