Install WordPress theme
Install a theme on an existing WordPress installation.
Install a theme on an existing WordPress installation.
Provide the WordPress installation (software) identifier in the path. It can
be obtained from GET /api/hosting/v1/wordpress/installations (the id
field).
When the theme is one of the Hostinger themes (hostinger-blog,
hostinger-affiliate-theme, hostinger-ai-theme), the optional palette,
layout, and font fields are forwarded to the custom installer (defaults:
palette1, layout1, default). For any other theme they are ignored.
This operation is asynchronous: a successful response only means the install job has been queued, not that the theme is ready.
API Token authentication
u123456789WordPress installation (software) identifier
1232456789Pattern: ^[0-9]+$Slug of the theme to install. Hostinger theme slugs (hostinger-blog, hostinger-affiliate-theme, hostinger-ai-theme) trigger the custom installer and forward the optional palette/layout/font fields; any other WordPress theme slug uses the standard installer and ignores those fields.
hostinger-blogPalette identifier. Only applied when the theme is a Hostinger theme; the default is used when omitted.
palette1Example: palette1Layout identifier. Only applied when the theme is a Hostinger theme; the default is used when omitted.
layout1Example: layout1Font identifier. Only applied when the theme is a Hostinger theme; the default is used when omitted.
defaultExample: defaultPossible values: Success empty response
Request acceptedUnauthenticated response
Validation error response
Error response
POST /api/hosting/v1/accounts/{username}/wordpress/{software}/themes/install HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 83
{
"theme": "hostinger-blog",
"palette": "palette1",
"layout": "layout1",
"font": "default"
}{
"message": "Request accepted"
}Last updated
Was this helpful?