Deploy WordPress theme
Deploy a WordPress theme from an already uploaded directory.
Deploy a WordPress theme from an already uploaded directory.
This endpoint allows you to deploy a WordPress theme that has been uploaded to the website's directory. The theme can be optionally activated after deployment.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
usernamestringRequiredExample:
u123456789domainstringRequiredExample:
Domain name
mydomain.tldBody
slugstringRequiredExample:
Slug of the theme
twentytwentyonetheme_pathstringRequiredExample:
Relative path to the theme directory from wp-content/themes
twentytwentyone-newis_activatedboolean · nullableOptionalDefault:
Whether to activate the theme after deployment
falseExample: falseResponses
200
Success response
application/json
messagestringOptionalExample:
Request accepted401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
post/api/hosting/v1/accounts/{username}/websites/{domain}/wordpress/themes/deploy
POST /api/hosting/v1/accounts/{username}/websites/{domain}/wordpress/themes/deploy HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"slug": "twentytwentyone",
"theme_path": "twentytwentyone-new",
"is_activated": false
}{
"message": "Request accepted"
}Last updated
Was this helpful?