site: Sites
The site
utility is used for managing sites within an existing webspace.
Note: For information on how to create and manage webspaces, refer to the Subscriptions: subscription Utility section.
Usage
site <command> <domain name> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
Example
The following command sets up a new domain example.com in the testdomain.tst webspace and enables hosting.
plesk bin site --create example.com -webspace-name testdomain.tst -hosting true
Commands
Command | Parameter | Description | Example |
---|---|---|---|
|
|
Creates a new website inside an existing webspace..
Requires the -webspace-name option. Note: If SELinux is enabled on your operating system, the |
To create a site with the name example.com inside the testdomain.tst webspace: plesk bin site --create example.com -webspace-name testdomain.tst or plesk bin site -c example.com -webspace-name testdomain.tst |
|
|
Updates configuration of an existing website. |
To enable the website example.com: plesk bin site --update example.com -status enabled or plesk bin site -u example.com -status enabled |
|
|
Deletes an existing website. |
To delete the website example.com: plesk bin site --remove example.com or plesk bin site -r example.com |
|
|
Displays information about configuration of a website. |
To view configuration information on the website example.com: plesk bin site --info example.com or plesk bin site -i example.com |
|
|
Activates a suspended website. |
To activate the website example.com: plesk bin site --on example.com |
|
|
Suspends a website. |
To suspend the domain example.com: plesk bin site -- |
|
|
Disables a website. |
To disable the domain example.com: plesk bin site --off example.com |
|
|
Displays the list of domains. |
To display the list of domains on the server: plesk bin site --list |
|
|
Updates custom PHP configuration for a website. Use the utility to set values for 16 most often used PHP settings (exposed to Plesk GUI) or to add any additional PHP directive. |
To set one of 16 general PHP settings, prepare the file with the settings you want to change. Note: File syntax should be the same with Then apply the settings to the site (example.com): plesk bin site --update-php-settings example.com -settings my_file
If you cannot find a certain PHP parameter among 16 general settings, add it as an additional directive to a file and apply the changes to the site (example.com): plesk bin site --update-php-settings example.com -additional-settings my_file_add |
|
|
Displays information about current PHP configuration of a website. |
To view the PHP configuration information for the website example.com: plesk bin site --show-php-settings example.com |
|
|
Displays help on the use of the utility. |
To view help on the use of the domain utility: plesk bin site --help or plesk bin site -h |
Options
Option | Parameter | Description | Example |
---|---|---|---|
|
|
Renames a domain. Used with the |
To rename the domain example.com to sample.net: plesk bin site -u example.com -new_name sample.net |
|
|
Enables/Disables DNS zone for a domain. |
To enable DNS zone for the domain example.com: plesk bin site -u example.com -dns true To disable a DNS zone for the domain example.com: plesk bin site -u example.com -dns false |
|
|
Enables/Disables the www prefix for a domain. Is |
To disable the www prefix for the domain example.com: plesk bin site -u example.com -www false |
|
|
Enables/Disables hosting for a domain. Is
|
To enable hosting for the domain example.com: plesk bin site -u example.com -hosting true |
|
|
Sets the type of hosting on a domain. The following types are available: physical hosting ( Is Requires the |
To set up the standard forwarding hosting (with forwarding to sample.org) for the existing domain example.com: plesk bin site -u example.com -hosting true -hst_type std -target_url sample.org |
|
|
Sets a target URL for the Standard forwarding and Frame forwarding types of hosting. Required with |
To set up a target URL for the domain example.com with the standard forwarding hosting (forwarding to sample.org): plesk bin site -u example.com -target_url sample.org -hst_type std |
|
|
Sets the IP address for the mail service for the specified domain. |
Set the IP address for the mail service for the domain example.com to 192.168.1.2: plesk bin site -u example.com -mail-service-ip 192.168.1.2 |
|
|
Specifies the HTTP response status code to be used for standard forwarding. |
To use the 302 code for forwarding on the domain example.com, which has the standard forwarding type of hosting: plesk bin site -u example.com -http_code 302 |
|
|
Turns on the search engine friendly HTTP 301 redirection. Use ' |
To turn on redirection for the domain example.com to www.example.com: plesk bin site -u example.com -seo-redirect www |
|
<path> |
Specifies website home directory (relative to the webspace root). |
To set up a website example.com within the directory site2 in the webspace: plesk bin site -c example.com -service-plan megaplan -www-root site2 |
|
|
Specifies the webspace name (the same as the name of the main domain in the webspace). |
To create a domain site2.com inside an existing webspace example.com for the customer with the username JDoe: plesk bin site -c site2.com -webspace-name example.com owner JDoe |
|
|
Specifies the parent domain name when creating a subdomain. |
To create a subdomain test.example.com for the parent domain example.com: plesk bin site -c test.example.com -parent-domain-name example.com |
|
|
Enables/Disables shell access for FTP user, and sets the OS system shell for FTP user access. |
To enable shell access for FTP user on the domain example.com, and to set the shell to plesk bin site -u example.com -shell /bin/sh |
|
< |
Limits the FTP user hard disk quota. Unlimited if set to A number without a letter is interpreted as the number of bytes. |
To set a 100 MB hard disk quota for the domain example.com: plesk bin site -u example.com -hard_quota 100M |
|
|
Sets the domain creation date. Used with the |
To set the creation date for domain example.com to 2008-12-30: plesk bin site -c example.com -creation-date 2008-12-30 |
|
|
Enables/Disables SSI support. Is |
To enable SSI support on the domain example.com: plesk bin site -u example.com -ssi true |
|
|
Enables/Disables PHP support. Is |
To enable PHP support on the domain example.com: plesk bin site -u example.com -php true |
|
|
Associates the PHP handler with the site. Specify the handler's identifier (default: |
To set PHP handler on the domain example.com to FastCGI: plesk bin site -u example.com -php_handler_type cgi |
|
|
Enables/Disables safe mode for PHP support. Is |
To disable safe mode for PHP support on the domain example.com: plesk bin site -u example.com -php true -php_safe_mode false |
|
|
Enables/Disables CGI support. Is |
To enable CGI support on the domain example.com: plesk bin site -u example.com -cgi true |
|
|
Determines the location of the cgi-bin directory. |
To set the location of the plesk bin site -u example.com -cgi-mode www-root |
|
|
Enables/Disables Perl support. Is |
To enable Perl support on the domain example.com: plesk bin site -u example.com -perl true |
|
|
Enables/Disables Apache ASP support. Is |
To enable Apache ASP support on the domain example.com: plesk bin site -u example.com -asp true |
|
|
Enables/Disables Python support. Is |
To enable Python support on the domain example.com: plesk bin site -u example.com -python true |
|
|
Enables/Disables FastCGI support. Is |
To enable FastCGI support on the domain example.com: plesk bin site -u example.com -fastcgi true |
|
|
Enables/Disables Miva support. Is |
To enable Miva support on the domain example.com: plesk bin site -u example.com -miva true |
|
|
Enables/Disables SSL support. Is |
To enable SSL support on the domain example.com: plesk bin site -u example.com -ssl true |
|
|
Enables/Disables Web statistic support; selects Web statistics application (Awstats or Webalizer). Is |
To enable Webalizer support on the domain example.com: plesk bin site -u example.com -webstat webalizer |
|
|
Enables/Disables access to web statistics data through password- protected directory Is |
To enable access to web statistics data through password- protected directory plesk bin site -u example.com -webstat-protdir-access true |
|
|
Sets the SSL certificate for the site. |
To set the SSL certificate testcert for the domain example.com: plesk bin site -u example.com -certificate-name testcert |
|
|
Enables/Disables custom server error messages. Is |
To enable custom error messages support on the domain example.com: plesk bin site -u example.com -err_docs true |
|
|
Enables/Disables log rotation. Is |
To enable log rotation on the domain example.com: plesk bin site -u example.com -log-rotate true |
|
|
Enables/Disables log rotation based on the current log file size. |
To enable log rotation on the domain example.com once the current log file reaches the 200 KB size: plesk bin site -u example.com -log-bysize 200 |
|
|
Enables/Disables log rotation by time. Is |
To enable weekly log rotation on the domain example.com: plesk bin site -u example.com -log-bytime weekly |
|
|
Limits the number of log files parameter. Is |
To restrict the maximum number of log files (current and rotated) on the domain example.com to 10: plesk bin site -u example.com |
|
|
Enables/Disables log file compression. Is |
To disable log file compression on the domain example.com: plesk bin site -u example.com -log-compress false |
|
|
Enables/Disables automatic sending of rotated log files to the specified email address. |
To enable automatic sending of rotated log files on the domain example.com to email address admin@example.com: plesk bin site -u example.com -log-email admin@example.com |
|
|
Enables/Disables mail service. Is |
To disable mail service on the domain example.com: plesk bin site -u example.com -mail_service false |
|
|
Specifies the IP address of the service node providing the mail service or the domain. |
To set the IP address of the service node providing the mail service for the domain example.com to 192.168.1.2: plesk bin site -u example.com -mail_service_node 192.168.1.2 |
|
|
Enables/Disables the mailing list service. Is |
To enable mailing list service on the domain example.com: plesk bin site -u example.com -maillist_service true |
|
|
Allows/Prohibits publishing site with Presence Builder. Is |
To allow publishing site with Presence Builder on the domain example.com: plesk bin site -u example.com -publish-sb-site true |
|
|
Limits the number of available connections. Unlimited is set to |
To limit the maximum number of connections available for the domain example.com to 10: plesk bin site -u example.com -max-connections 10 |
|
|
Limits the network use. Unlimited is set to |
To limit the maximum network use on the domain example.com to 500 KB/S: plesk bin site -u example.com -traffic-bandwidth 500 |
|
|
Allows/Prohibits standard email notifications on a domain creation (Plesk domain administrators and clients). Used with |
To prevent email notifications about domain creation: plesk bin site --create example.com -notify false |
|
|
Specifies the IP address to be assigned to the subscription after the subscription owner change. |
To assign the IP address 192.168.1.2 to the subscription example.com after the ownership change: plesk bin site -u example.com -map_ip 192.168.1.2 |
|
|
Specifies a description of the subscription to be displayed in Plesk. |
To create a description of the domain example.com: plesk bin site -u example.com -description "Notes about this site" |
|
|
Specifies a description of the subscription for the administrator. It is displayed in Plesk only to the administrator. |
To create a description of the domain example.com that will be visible for the administrator only: plesk bin site -u example.com -admin-description "Admin's notes about this site" |
|
|
Specifies a description of a subscription owned by a reseller. It is displayed in Plesk to the reseller and administrator. |
To create a description of the domain example.com that will be visible to the reseller and the administrator: plesk bin site -u example.com -reseller-description "Reseller's notes about this site" |
|
|
Sets the file containing custom PHP settings for a site. The file can include only 16 general PHP settings exposed to the Plesk GUI. Used with |
To set custom PHP configuration from the file my_file to the site example.com: plesk bin site --update-php-settings example.com -settings my_file |
|
|
Sets the file containing custom PHP settings for a site. The file can include any PHP directive except 16 general PHP settings exposed to the Plesk GUI. Used with |
To add directives to custom PHP configuration from the file my_file_add (example.com): plesk bin site --update-php-settings example.com -additional-settings my_file_add |
|
|
Sets the maximum number of outgoing messages from a specified site (per hour). To set the Unlimited value, specify "-1". Specify "default" to set the value specified in server-wide settings. |
To set the limit on outgoing email messages from a domain: plesk bin site -u example.com |