wp_delete_user
Delete a WordPress user permanently and reassign authored content to another user; dry-run preview prevents accidental deletion and production writes require explicit approval.
Instructions
PERMANENTLY delete a user; their content goes to reassign (0 = deleted too).
There is no trash and no undo for a user: WordPress's REST API only deletes with
force, so this cannot be reversed from here. reassign decides what happens to
everything they authored - posts, pages, media: the DEFAULT of 0 DELETES THEIR
CONTENT WITH THEM, while any other user id transfers authorship to that user (get
one from wp_list_users). If the account wrote anything you want to keep, pass a
reassign target. DEFAULTS TO dry_run=true (returns a preview that spells out which
of the two outcomes you are about to get; deletes nothing). Pass dry_run=false to
delete. Requires the REST transport and an administrator app password. Prod writes
require allow_prod=true.
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": {
"install": "<install>",
"user_id": "<user_id>"
},
"name": "wp_delete_user"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| install | Yes | ||
| user_id | Yes | ||
| reassign | No | ||
| allow_prod | No |