WPX

Delete a WordPress installation permanently

Changed on

This function permanently deletes a WordPress installation that the caller owns. It removes the site's files and its database.

Note:

  • This action cannot be undone. There is no recycle bin, and the system keeps no copy of the files or the database.
  • The onboarding flow calls this to clear an existing installation before it retries create_website. When create_website reports a collision, call this function once for each entry in the existing_installations field, then call create_website again.
  • This function is not idempotent. A second call for the same id parameter fails, because the installation no longer exists.
  • The system verifies that the caller owns the installation before it deletes anything. An installation that belongs to another account is indistinguishable from one that does not exist.
post/WPX/remove_installation

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Request body application/x-www-form-urlencoded

idinteger required

The WordPress Toolkit installation id, as returned in the wptk_id field of list_websites.

Example request

{
  "id": 17
}

Response

The HTTP request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "remove_installation",
  "module": "WPX",
  "result": {
    "data": {
      "id": 17,
      "removed": 1
    },
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}

Changes