Skip to content

List WordPress plugins

GET /api/v2/shared-hosting/{accountId}/wordpress-plugins

List the plugin folders in a WordPress site’s wp-content/plugins on a web hosting account. The list is read from the files. It works when WordPress itself cannot start. disabled: true means the plugin was switched off with POST /api/v2/shared-hosting/{accountId}/wordpress-plugins/{slug}/actions/toggle. The list does not say whether WordPress has a plugin activated. A site without wp-content/plugins returns 404 not_found. The account must be active and on cPanel.

Authentication: An API key with the scopes read:hosting and console:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The web hosting account ID (acct_…).

Query parameters

domainstring
A domain on the account. Default: the account’s main domain.

Example

GET /api/v2/shared-hosting/{accountId}/wordpress-plugins
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/wordpress-plugins" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The site’s plugin folders, sorted by slug.

Response 200
{
"plugins": [
{
"slug": "contact-form-7",
"disabled": false
},
{
"slug": "example-cache",
"disabled": true
}
]
}
Response fields
pluginsarray of object
One entry per plugin folder.
slugstring
The plugin’s folder name.
disabledboolean
True when the folder was renamed to switch the plugin off.

Errors

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

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403The key lacks a scope or the account is not active. domain_not_owned: the domain is not on this account.
404The site has no wp-content/plugins folder (not_found). It is not a WordPress site.
409The account is not on cPanel (account_not_eligible_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 plugin folder could not be read right now (upstream_failed).