Uninstall a WordPress site
DELETE /api/v2/shared-hosting/{accountId}/wordpress/{siteId}
Uninstall a WordPress site from a web hosting account. By default this also deletes the site’s files, its database and its database user. Send false for removeFiles, removeDatabase or removeDatabaseUser to keep that part. This call cannot be undone. The account must be active and on cPanel.
Authentication: An API key with the scopes write:hosting and console:services. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe web hosting account ID (
acct_…).siteIdstringrequiredThe WordPress site ID (
wp_…).Body (optional)
removeFilesbooleanDelete the site’s files. Default
true.removeDatabasebooleanDelete the site’s database. Default
true.removeDatabaseUserbooleanDelete the site’s database user. Default
true.Example
curl -X DELETE "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/wordpress/wp_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "removeFiles": true, "removeDatabase": true, "removeDatabaseUser": true }'curl -X DELETE "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/wordpress/wp_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "removeFiles": true, "removeDatabase": false, "removeDatabaseUser": false }'Responses
204 The site was uninstalled.
Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | The site ID or the body is invalid (invalid_request). |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | No such WordPress site on this account (wp_installation_not_found). |
| 409 | account_suspended: the hosting account is suspended. account_not_eligible_cpanel: the account is not on cPanel. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | The site could not be uninstalled right now (upstream_failed). |