Install theme
Install a WordPress theme from the WordPress.org repository.
POST/api/servers/{server}/sites/{id}/wordpress/themes/install
Install theme
Installs a WordPress theme by its slug from the WordPress.org repository. Optionally activates the theme after installation. Requires WP-CLI to be installed on the server.
Required attributes
- Name
theme- Type
- string
- Description
The theme slug to install (e.g.
flavor). Must contain only lowercase letters, numbers, and hyphens.
Optional attributes
- Name
activate- Type
- boolean
- Description
When set to
true, the theme will be activated immediately after installation. Defaults tofalse.
Query parameters
- Name
ondemand- Type
- boolean
- Description
When set to
true, the command runs synchronously and returns the result directly. When omitted orfalse(default), the action is queued and processed in the background.
Request
POST
/api/servers/{server}/sites/{id}/wordpress/themes/installcurl -X POST "https://ploi.io/api/servers/{server}/sites/{id}/wordpress/themes/install?ondemand=true" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"theme": "flavor", "activate": true}'
Response
{
"status": "ok",
"message": "Theme installed."
}