Guide to Site Publisher Templates - The Configuration File

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

 

  • /var/cpanel/customizations/site_templates/ — Templates that the root user owns.
  • /home/username/var/cpanel/reseller/site_templates/ — Templates that a reseller owns, where username represents the reseller's username.
  • /usr/local/cpanel/etc/site_templates/ — cPanel-provided templates.

 

/usr/local/cpanel/etc/site_templates

template

string

The template's name.

The template name.

Note:

This file uses the name of the template's directory within one of the three 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

Note:

In this example, description and email_address are template-specific values. 

1
2
3
4
5
6
7
{
     "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"
}
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....