Description
This function publishes a Site Publisher website.
- This function uses the
/scripts/process_site_template
script to publish the Site Publisher website. - This function creates the
configurations.json
file in the specified directory.- This file contains the user-entered data for the Site Publisher website, and uses
0700
permissions.
- This file contains the user-entered data for the Site Publisher website, and uses
- In cPanel & WHM version 58 and later, when users publish a Site Publisher website, the system first creates a backup tarball of the target directory's contents in the
site_publisher/backups/
directory within the user's home directory.
Note:
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.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
target or docroot |
string |
Required The directory that will contain the Site Publisher website. |
The absolute path to the desired domain's document root. |
/home/example/public_html |
source |
string |
The desired template's source directory. If you do not specify a value, the system uses the pathand template values to determine the template's source directory. Note: You must include either the sourceparameter or thepath and templateparameters. |
The absolute path to a template directory that exists in one of the following directories:
|
/usr/local/cpanel/etc/site_templates/under_construction |
path |
string |
The directory that contains the template's source directory. Note: You must include either the sourceparameter or thepath and templateparameters. |
|
/usr/local/cpanel/etc/site_templates |
template |
string |
The template's directory's name. Note: You must include either the sourceparameter or thepath and templateparameters. |
A valid string. |
under_construction |
parameter_name |
string |
The template's variables and values. Notes:
|
A valid string. |
My Website |