site: Sites
The site
utility is used for managing sites within an existing
subscription.
Note: For information on how to create and manage subscriptions, 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 subscription and enables hosting.
plesk bin site --create example.com -webspace-name testdomain.tst -hosting true
Commands
Command | Parameter | Description | Example |
---|---|---|---|
--create or -c
|
<domain_name> |
Creates a new website inside an existing subscription.. 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 subscription: plesk bin site --create example.com -webspace-name testdomain.tst or plesk bin site -c example.com -webspace-name testdomain.tst |
--update or -u
|
<domain_name> |
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 |
--move |
<domain_name> |
Moves an add-on domain to an existing or a new subscription. |
To move addon_domain.com to target_subscription.com: plesk bin site --move addon_domain.com -webspace-name target_subscription.com To move addon_domain.com to a new subscription (addon_domain.com will then become the default domain of the new subscription): plesk bin site --move addon_domain.com -login login -passwd password |
--remove or -r
|
<domain_name> |
Deletes an existing website. |
To delete the website example.com: plesk bin site --remove example.com or plesk bin site -r example.com |
--info or -i
|
<domain_name> |
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 |
--on |
<domain_name> |
Activates a suspended website. |
To activate the website example.com: plesk bin site --on example.com |
--suspend |
<domain_name> |
Suspends a website. |
To suspend the domain example.com: plesk bin site --suspend example.com |
--off |
<domain_name> |
Disables a website. |
To disable the domain example.com: plesk bin site --off example.com |
--list or -l
|
Displays the list of domains. |
To display the list of domains on the server: plesk bin site --list |
|
--update-php-settings |
<domain_name> |
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 |
--show-php-settings |
<domain_name> |
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 |
--help or -h
|
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 |
---|---|---|---|
-new_name |
<domain_name> |
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 |
-dns |
true|false |
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 |
-www |
true|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 |
-hosting |
true|false |
Enables/Disables hosting for a domain. Is |
To enable hosting for the domain example.com: plesk bin site -u example.com -hosting true |
-hst_type |
phys|std|frm |
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 |
-target_url |
<URL> |
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 |
-mail-service-ip |
<IP address>[,<IP address>,..] |
Sets the IP address for the mail service for the specified domain.
Note:
The server-wide mail setting “Send from the specified IP addresses” (next to “Outgoing mail mode”)
takes precedence over the |
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 |
-http_code |
301|302 |
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 |
-seo-redirect |
non-www|www|none |
Turns on the search engine friendly HTTP 301 redirection. Use
‘non-www ’ to redirect from www.domain to domain ,
‘www ’ to redirect from domain to www.domain , and
‘none ’ to turn off the redirection (default: non-www ). |
To turn on redirection for the domain example.com to www.example.com: plesk bin site -u example.com -seo-redirect www |
-www-root |
<path> | Specifies website home directory (relative to the subscription root). |
To set up a website example.com within the directory site2 in the subscription: plesk bin site -c example.com -service-plan megaplan -www-root site2 |
-webspace-name |
<domain> |
Specifies the subscription name (the same as the name of the main domain in the subscription). |
To create a domain site2.com inside an existing subscription example.com for the customer with the username JDoe: plesk bin site -c site2.com -webspace-name example.com owner JDoe |
-parent-domain-name |
<parent_domain_name> |
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 |
-hard_quota |
<number>[K|M|G]
|
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 |
-creation-date |
<YYYY-MM-DD> |
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 |
-ssi |
true|false |
Enables/Disables SSI support. Is |
To enable SSI support on the domain example.com: plesk bin site -u example.com -ssi true |
-php |
true|false |
Enables/Disables PHP support. Is |
To enable PHP support on the domain example.com: plesk bin site -u example.com -php true |
-php_handler_id |
module|cgi|fastcgi |
Associates the PHP handler with the site. Specify the handler’s
identifier (default: cgi ). |
To set PHP handler on the domain example.com to FastCGI: plesk bin site -u example.com -php_handler_id fastcgi |
-php_safe_mode |
true|false |
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 |
-cgi |
true|false |
Enables/Disables CGI support. Is |
To enable CGI support on the domain example.com: plesk bin site -u example.com -cgi true |
-cgi-mode |
webspace|www-root |
Determines the location of the cgi-bin directory. |
To set the location of the plesk bin site -u example.com -cgi-mode www-root |
-perl |
true|false |
Enables/Disables Perl support. Is |
To enable Perl support on the domain example.com: plesk bin site -u example.com -perl true |
-asp |
true|false |
Enables/Disables Apache ASP support. Is |
To enable Apache ASP support on the domain example.com: plesk bin site -u example.com -asp true |
-python |
true|false |
Enables/Disables Python support. Is |
To enable Python support on the domain example.com: plesk bin site -u example.com -python true |
-fastcgi |
true|false |
Enables/Disables FastCGI support. Is |
To enable FastCGI support on the domain example.com: plesk bin site -u example.com -fastcgi true |
-ssl |
true|false |
Enables/Disables SSL/TLS support. Is |
To disable SSL/TLS support on the domain example.com: plesk bin site -u example.com -ssl false |
-ssl-redirect |
true|false |
Enables/Disables SEO-safe 301 redirection from HTTP to HTTPS. Is |
To disable redirection from HTTP to HTTPS on the domain example.com: plesk bin site -u example.com -ssl-redirect false |
-webstat |
none|awstats|webalizer |
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 |
-webstat-protdir-access |
true|false |
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 |
-certificate-name |
<SSL/TLS certificate name> |
Sets the SSL/TLS certificate for the site. |
To set the SSL/TLS certificate testcert for the domain example.com: plesk bin site -u example.com -certificate-name testcert |
-err_docs |
true|false |
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 |
-log-rotate |
true|false |
Enables/Disables log rotation. Is |
To enable log rotation on the domain example.com: plesk bin site -u example.com -log-rotate true |
-log-bysize |
<number>[B|K|M|G|T] |
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 |
-log-bytime |
daily|weekly|monthly |
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 |
-log-max-num-files |
<number> |
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 -log-max-num-files 10 |
-log-compress |
true|false |
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 |
-log-email |
<email> |
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 |
-mail_service |
true|false |
Enables/Disables mail service. Is |
To disable mail service on the domain example.com: plesk bin site -u example.com -mail_service false |
-mail_service_node_ip |
<IP address> | local |
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 |
-maillist_service |
true|false |
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 |
-publish-sb-site |
true|false |
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 |
-notify |
true|false |
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 |
-map_ip |
<IP address>[,<IP address>] |
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 |
-description |
<string> |
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" |
-admin-description |
<string> |
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" |
-reseller-description |
<string> |
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" |
-settings |
<filename> |
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 |
-additional-settings |
<filename> |
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 |
-outgoing-messages-domain-limit |
<number>|default |
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 -outgoing-messages-domain-limit 15 |
-empty-document-root |
true | false |
Creates a site with empty document root directory (skips promo pages creation). |
To create a domain with empty document root: plesk bin site -c example.com -hosting true -login login -passwd setup -ip 10.52.76.142 -empty-document-root true |