WPX
Update WordPress administrator password
Changed onThis function sets a new password for a WordPress administrator of an installation that the caller owns.
Note:
- Over HTTP this function accepts only the POST method, and it rejects any request that carries a password key in the URL query string. It checks both before it reads the password, so the password cannot reach an access log, a proxy log, or the browser history. The Perl bindings and the uapi command-line tool set no request method and no query string, so they are unaffected.
- The system passes the password to WordPress through a file that only the caller can read, so it never appears in a process list, in the process environment, or in the WordPress Toolkit logs.
- The system applies no password-strength rule of its own. Any non-empty value is accepted.
- The system verifies that the caller owns the installation before it changes anything.
post/WPX/change_admin_password
Request
- Base URLhttps://cpanel-server.tld:2083/execute
- AuthHTTP basic
Request body application/x-www-form-urlencoded
Example request
{
"id": 17,
"login": "admin_abcd",
"password": "EXAMPLE-PASSWORD-PLACEHOLDER"
}Response
The HTTP request was successful.
Example response
{
"apiversion": 3,
"func": "change_admin_password",
"module": "WPX",
"result": {
"data": {
"changed": 1,
"id": 17,
"login": "admin_abcd"
},
"metadata": {
"transformed": 1
},
"status": 1
}
}Changes
- info
endpoint added
- info