Development Guides Home >> Guide to Site Publisher Templates
Guide to Site Publisher Templates - The Configuration File
We removed cPanel's Site Publisher interface and its templates in cPanel & WHM version 134. For more information, read our cPanel Deprecation Plan documentation.
Introduction
The Site Publisher feature publishes configuration data with each Site Publisher website's files.
We strongly recommend that users do not modify configuration files directly. Direct edits to these files may cause problems in cPanel's Site Publisher interface (cPanel >> Home >> Domains >> Site Publisher).
Each Site Publisher website includes a configuration file in the target domain's home directory (document root).
-
The system stores configuration data in the /
home/user/site_publisher/configurations/directory, whereuserrepresents the cPanel account's username. It saves this file as thehome-user-public_html-example.com.jsonfile, wherehome-user-public_html-example.comrepresents the Site Publisher website's target directory, with hyphens (-) instead of slashes (/). - cPanel's Site Publisher interface ( cPanel >> Home >> Domains >> Site Publisher ) uses these files to retrieve information about existing Site Publisher websites.
- This file contains a hash of JSON-formatted parameters and values for the domain's Site Publisher website.
The configuration file
Each configuration file contains the following parameters:
| Parameter | Type | Description | Possible values | Example |
|---|---|---|---|---|
path |
string | The absolute path to the directory that contains the website's template. |
|
/usr/local/cpanel/3rdparty/share/site_templates |
template |
string | The template's name. | The template name. This file uses the name of the template's directory within one of the site_templates directories as the template name. |
under_construction |
docroot |
string | The domain's home directory. | The absolute path to the directory to which the user published the Site Publisher website. | /home/username/public_html/example.com |
Example
In this example, description and email_address are template-specific values.
{
"path":"/usr/local/cpanel/etc/site_templates",
"description":"This is my website. It's coming soon!",
"template":"under_construction",
"email_address":"user@example.com",
"docroot":"/home/username/public_html/example.com"
}