Activate theme

Activate a WordPress theme on a site.


POST/api/servers/{server}/sites/{id}/wordpress/themes/activate

Activate theme

Activates the specified WordPress theme. Requires WP-CLI to be installed on the server.

Required attributes

  • Name
    theme
    Type
    string
    Description

    The theme slug to activate (e.g. twentytwentyfive).

Query parameters

  • Name
    ondemand
    Type
    boolean
    Description

    When set to true, the command runs synchronously and returns the result directly. When omitted or false (default), the action is queued and processed in the background.

Request

POST
/api/servers/{server}/sites/{id}/wordpress/themes/activate
curl -X POST "https://ploi.io/api/servers/{server}/sites/{id}/wordpress/themes/activate?ondemand=true" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"theme": "twentytwentyfive"}'

Response

{
  "status": "ok",
  "message": "Theme activated."
}