This function publishes a Site Publisher website.
/scripts/process_site_template
script to publish the Site Publisher website.configurations.json
file in the specified directory.0700
permissions./site_publisher/backups/
directory within the user's home directory.Notes:
/usr/local/cpanel/logs/error_log
file.root
user or a reseller owns the template:/var/cpanel/customizations/site_templates/
— The root
user's templates./home/username/var/cpanel/reseller/site_templates/
— A reseller's templates, where username
represents the reseller's username./usr/local/cpanel/3rdparty/share/site_templates/
— cPanel-provided templates.Important:
When you disable the Web Server role, the system disables this function.
target or docroot required | string <path> The directory that will contain the Site Publisher website. Example: target or docroot=/home/example/public_html |
parameter_name | string The template's variables and values. Note:
Example: parameter_name=My Website |
path | string <path> The directory that contains the template's source directory.
Note: You must include either the Example: path=/usr/local/cpanel/3rdparty/share/site_templates/ |
source | string <path> The absolute path to a template directory that exists in one of the following directories:
If you do not specify a value, the system uses the path and template values to determine the template's source directory. Note: You must include either the Example: source=/usr/local/cpanel/3rdparty/share/site_templates/under_construction |
template | string The template's directory's name. Note: You must include either the Example: template=under_construction |
uapi --output=jsonpretty \ --user=username \ SiteTemplates \ publish \ target or docroot='/home/example/public_html'
{- "apiversion": 3,
- "func": "publish",
- "module": "SiteTemplates",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}