Page tree
Skip to end of metadata
Go to start of metadata

For cPanel & WHM version 56


The /scripts/process_site_templates script processes template files and user-provided data to create a Site Publisher website.


You cannot run this script as the root user. 


When users publish a Site Publisher website, the system logs template information and the target directory to the /usr/local/cpanel/logs/error_log file. 

Run the /scripts/process_site_templates script

To run the /scripts/process_site_templates script on the command line, use the following format:

/scripts/process_site_templates [options]


You can use the following options with the /scripts/process_site_templates script:


Define a template variable and its desired value. Each template variable requires a separate --define flag.


The template that you specify determines the values to define.

  • If you use a cPanel-provided template, read our Guide to Site Publisher Templates documentation for a list of template variables.
  • If you use a third-party template, consult that template's documentation or its meta.json file.
--helpDisplay a help message.

Define the absolute path to the template's source location.

  • /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.

--targetDefine the absolute path to the directory to which you wish to publish the Site Publisher website. Generally, you should specify the target domain's home directory path.


For example, to use the /scripts/process_site_templates script, you could run the following command:

/scripts/process_site_templates --source=/var/cpanel/customizations/site_templates/my_template --target=/home/username/public_html/ --define business_name="National Emotion, Inc." --define phone="867-5309" --define contact=""

This example uses the root user's my_template template to publish a website for the username cPanel user's domain, and defines values for three parameters that the my_template template uses.