Child pages
  • Guide to Site Publisher Templates - The Configuration File
Skip to end of metadata
Go to start of metadata

Introduction

The Site Publisher feature publishes configuration data with each Site Publisher website's files.

Warning:

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).

  • In cPanel & WHM version 56, the system stores configuration data in the configurations.json file in the Site Publisher website's target directory.
  • In cPanel & WHM version 58 and later, the system stores configuration data in the /home/user/site_publisher/configurations/ directory, where user represents the cPanel account's username. It saves this file as the home-user-public_html-example.com.json file, where home-user-public_html-example.com represents 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:

ParameterTypeDescriptionPossible valuesExample
pathstring

The absolute path to the directory that contains the website's 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/etc/site_templates/ — cPanel-provided templates in cPanel & WHM version 56 through 68.
  • /usr/local/cpanel/3rdparty/share/site_templates/ — cPanel-provided templates in cPanel & WHM version 70 and higher.

/usr/local/cpanel/3rdparty/share/site_templates
templatestring

The template's name.

The template name.

Note:

This file uses the name of the template's directory within one of the site_templates directories as the template name. 

under_construction
docrootstring

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

Note:

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"
}