WPX
Return WordPress disk quota status
Changed onThis function reports whether the caller's disk usage is already at or near the limit that would block a new WordPress installation. The check reserves headroom for the install itself, so it can report 1 before the account has actually exceeded its quota.
Note:
- The onboarding flow calls this up front, before it offers to install WordPress, so it can explain the refusal instead of failing partway through create_website.
- This function takes no parameters and has no failure path of its own, beyond the wp-toolkit feature that every function in this module needs. A caller that holds the feature always gets a successful status.
- create_website repeats the same check and refuses with an error when the quota blocks the install.
get/WPX/has_reached_quota
Request
- Base URLhttps://cpanel-server.tld:2083/execute
- AuthHTTP basic
Response
The HTTP request was successful.
Example response
{
"apiversion": 3,
"func": "has_reached_quota",
"module": "WPX",
"result": {
"metadata": {
"transformed": 1
},
"status": 1
}
}Changes
- info
endpoint added
- info