v1

latestOpenAPI 3.0.02026-07-14198572488.4 KB
WordPress

Execute cli command on wp installation ([Deprecated])

[Deprecated]: Use /sites/{id}/wpcli instead.

post/v1/sites/{id}/cli

Path parameters

idinteger required

ID of the Site you are interacting with

Example:8880000888

Request body

commandstring required

Name of the wp cli command to execute: examples: admin, cache, cap, post, user. i.e. wp post gives us post

actionstring

Action to execute. i.e. wp post meta gives us meta

valuestring

Value(s) to pass to the command

paramsstring

Additional parameters to pass to the command

Example request

{
  "command": "post",
  "action": "meta",
  "value": "set 123 _wp_page_template about.php",
  "params": "--format=json --skip-plugins --skip-themes"
}

Response

OK

successboolean

whether the request succeeded

errorsstring[]
messagesstring[] nullable

Example response

{
  "success": true,
  "errors": [],
  "messages": []
}