Delete theme
Remove a WordPress theme.
DELETE/api/servers/{server}/sites/{id}/wordpress/themes/delete
Delete theme
Removes the specified WordPress theme from the server. The theme must be inactive before it can be deleted. Requires WP-CLI to be installed on the server.
Required attributes
- Name
theme- Type
- string
- Description
The theme slug to delete (e.g.
flavor).
Query parameters
- Name
ondemand- Type
- boolean
- Description
When set to
true, the command runs synchronously and returns the result directly. When omitted orfalse(default), the action is queued and processed in the background.
Request
DELETE
/api/servers/{server}/sites/{id}/wordpress/themes/deletecurl -X DELETE "https://ploi.io/api/servers/{server}/sites/{id}/wordpress/themes/delete?ondemand=true" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"theme": "flavor"}'
Response
{
"status": "ok",
"message": "Theme deleted."
}