Skip to content

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

accountIdstringrequired
The web hosting account ID (acct_…).
siteIdstringrequired
The WordPress site ID (wp_…).

Body (optional)

removeFilesboolean
Delete the site’s files. Default true.
removeDatabaseboolean
Delete the site’s database. Default true.
removeDatabaseUserboolean
Delete the site’s database user. Default true.

Example

DELETE /api/v2/shared-hosting/{accountId}/wordpress/{siteId}
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
}'

Responses

204 The site was uninstalled.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400The site ID or the body is invalid (invalid_request).
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404No such WordPress site on this account (wp_installation_not_found).
409account_suspended: the hosting account is suspended. account_not_eligible_cpanel: the account is not on cPanel.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502The site could not be uninstalled right now (upstream_failed).