# site.exe: Sites

The `site.exe` 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.

## Location

`%plesk_cli%`

## Usage

    site.exe <command> [<domain name>] [
    <option 1> <param> [<option 2> <param>] ... [<option N> <param>]
    ]

## Example

The following command sets up a new domain example.com within the testdomain.tst subscription.

    plesk bin site.exe --create example.com -webspace-name testdomain.tst

## Commands

Command | Parameter | Description | Example
--- | --- | --- | ---
`--create` or `-c` | `<domain name>` | Creates a new domain under an existing subscription. Requires the -webspace-name option. | To add a site e xample.com to the testdomain.tst subscription:
    plesk bin site.exe --create example.com -webspace-name testdomain.tst
or
    plesk bin site.exe -c example.com -webspace-name testdomain.tst
`--update` or `-u` | `<domain name>` | Updates properties of an existing domain. | To limit the amount of disk space that example.com can occupy to 200 MB:
    plesk bin site.exe --update example.com -hard_quota 200M
or
    plesk bin site.exe -u example.com -hard_quota 200M
`--remove` or `-r` | `<domain name>` | Removes a domain. | To remove example.com:
    plesk bin site.exe --remove example.com
or
    plesk bin site.exe -r example.com
`--info` or `-i` | `<domain name>` | Retrieves domain info. | To retrieve information about example.com:
    plesk bin site.exe --info example.com
or
    plesk bin site.exe --i example.com
`--on` | `<domain name>` | Enables a domain. | To enable example.com:
    plesk bin site.exe --on example.com
`--off` | `<domain name>` | Disables a domain. | To disable example.com:
    plesk bin site.exe --off example.com
`--set-iis-app-pool-settings` | `<domain name>` | Sets IIS application pool settings for the specified domain name. The following settings can be specified: `-iis-app-pool-turned-on` This turns IIS application pool on or off. `-cpu-usage-state` This turns on or off monitoring of CPU usage by IIS application pool. `-cpu-usage-value` This sets the maximum allowed CPU usage rate for IIS application pool. `-cpu-usage-action` This sets the action that IIS takes when worker processes exceed the CPU usage limit. `-cpu-usage-interval` This sets the reset interval - the period of time when the CPU monitoring data is reset. | To switch on IIS application pool for the domain example.com and limit CPU usage to 5 percent:
    plesk bin site.exe --set-iis-app-pool-settings example.com -iis-app-pool-turned-on true -cpu-usage-state true -cpu-usage-value 5
`--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 the 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 `php.ini` (`<parameter>=<value>`). To set the default value to the parameter, do not use any value: `<parameter>=` Then apply the settings to the site (example.com):
    plesk bin site.exe --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.exe --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.exe --show-php-settings example.com
`--suspend` | `<domain_name>` | Suspends the specified domain. | To suspend the website example.com:
    plesk bin subscription.exe --suspend example.com
`--help` or `-h` |  | Displays help on the use of the utility. | To output the help info on the use of this utility:
    plesk bin site.exe --help
or
    plesk bin site.exe -h

## Options

Option | Parameter | Description | Example
--- | --- | --- | ---
`-new_name` | `<domain>` | Renames a specified domain. | To rename the domain from example.com to sample.com:
    plesk bin site.exe --update example.com -new_name sample.com
`-dns` | `true|false` | Enables/Disables DNS zone. By default, settings from the current server-wide DNS template are used. | To enable the DNS zone for example.com:
    plesk bin site.exe -u example.com -dns true
`-www` | `true|false` | Allows/Prohibits accessing the domain using URL with the www prefix. Is `true` by default. | To remove the www prefix from example.com:
    plesk bin site.exe --update example.com -www false
`-hosting` | `true|false` | Enables/Disables hosting. Is `true` by default. | To enable hosting for the domain example.com:
    plesk bin site.exe --update example.com -hosting true
`-hst_type` | `phys | std | frm` | Sets up the type of hosting. Here, `phys` means physical hosting, `std` standard forwarding hosting, and `frm` frame forwarding hosting. Default value is `phys`. | To set up standard forwarding hosting on the domain example.com:
    plesk bin site.exe --update example.com -hst_type std -login john
`-target_url` | `<URL>` | Sets the target URL for forwarding hosting types. Required if the `-hst_type` option is set to `std` or `frm`. | To set up standard forwarding to the target URL sample.com for the domain example.com:
    plesk bin site.exe --update example.com -hst_type std -target_url www.sample.com
`-mail-service-ip` | `<IP address>[,<IP address>,..]` | 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.exe -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.exe -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.exe -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 within the subscription:
    plesk bin site.exe -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 under the subscription). | To create a domain site2.com within an existing subscription example.com for the customer with the username JDoe:
    plesk bin site.exe -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.exe -c test.example.com -parent-domain-name example.com
`-domain` or `-d` | `<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.exe -c test.example.com -domain example.com
`-subdomains` or `-s` | `<<subdomain[...]>` | Use for specifying the subdomains to be removed or to retrieve subdomain information (`--remove` and `--info` commands respectively). By default the `--info` command outputs information on all existing subdomains. | To remove subdomains test1.example.com and test2.example.com:
    plesk bin site.exe -r -s  test1.example.com,test2.example.com
`-creation-date` | `<YYYY-MM-DD>` | Sets the domain creation date. Used with the `--create` only. | To set the creation date for domain example.com to 2009-12-30:
    plesk bin site.exe -c example.com -creation-date 2008-12-30
`-max-connections` | `<number>` | Limits the number of available connections. Unlimited is set to `-1`. | To limit the maximum number of connections available for the domain example.com to 10:
    plesk bin site.exe -u example.com -max-connections 10
`-traffic-bandwidth` | `<number>` | Limits the network use. Unlimited is set to `-1`. | To limit the maximum network use on the domain example.com to 500 KB/S:
    plesk bin site.exe -u example.com -traffic-bandwidth 500
`-shell` | `"Login Disabled" | "Login Enabled"` | Enables/Disables access to the system via remote desktop panel (RDP). Is `"Login Disabled"` by default. | To enable access to the system via RDP:
    plesk bin site.exe --update example.com -shell "Login Enabled"
`-hard_quota` | <`number>[K|M|G]` | Sets the maximum amount of disk space available for the domain files. Unlimited if set to `0`. | To set the 100 MB disk quota for example.com:
    plesk bin site.exe --update example.com -hard_quota 100M
`-publish_sb_site` | `true|false` | Enables/Disables the creation and publishing of an empty site by Presence Builder when creating a new domain for the client with SB support. Is `true` by default. | Not to create and publish an empty site when updating example.com:
    plesk bin site.exe -u example.com -publish-sb-site false
`-ssi` | `true|false` | Enables/Disables SSI support. Is `false` by default. | To enable SSI support on example.com:
    plesk bin site.exe --update example.com -ssi true
`-ssi_html` | `true|false` | Enables/Disables SSI support for HTML and HTM files. Is `false` by default. | To enable SSI support for HTML and HTM files on example.com:
    plesk bin site.exe -u example.com -ssi_html true
`-php` | `true|false` | Enables/Disables PHP support. Is `false` by default. | To enable PHP support on example.com:
    plesk bin site.exe --update example.com -php true
`-php_handler_id` | `cgi-5 | cgi-5.3 | cgi-5.4 | fastcgi-5 | fastcgi-5.3 | fastcgi-5.4 | isapi-5` | Associates the specified PHP handler with the specified website. Specify the handler’s identifier (`fastcgi-5` by default). | To enable running PHP of version 5 as ISAPI extension on example.com:
    plesk bin site.exe -u example.com -php_handler_id isapi-5
`-cgi` | `true|false` | Enables/Disables CGI support. Is `false` by default. | To enable CGI support on example.com:
    plesk bin site.exe --update example.com -cgi true
`-cgi-mode` | `webspace|www-root` | Determines the location of the cgi-bin directory. | To set the location of the `cgi-bin` directory for the domain example.com to wwwroot:
    plesk bin site.exe -u example.com -cgi-mode www-root
`-perl` | `true|false` | Enables/Disables Perl support. Is `false` by default. | To enable Perl support on example.com:
    plesk bin site.exe --update example.com -perl true
`-asp` | `true|false` | Enables/Disables ASP support. Is `false` by default. | To enable ASP support on example.com:
    plesk bin site.exe --update example.com -asp true
`-python` | `true|false` | Enables/Disables Python support. Is `false` by default. | To enable Python support on example.com:
    plesk bin site.exe --update example.com -python true
`-ssl` | `true|false` | Enables/Disables accessing a domain via SSL/TLS. Is `false` by default. | To enable SSL/TLS support on example.com:
    plesk bin site.exe --update example.com -ssl true
`-ssl-redirect` | `true|false` | Enables/Disables SEO-safe 301 redirection from HTTP to HTTPS. Is `false` by default. | To enable redirection from HTTP to HTTPS on the domain example.com:
    plesk bin site.exe --update example.com -ssl-redirect true
`-webstat` | `none | webalizer | awstats | smarterstats` | Sets up which web statistics tool should be used on a domain. Is `none` by default. | To set Webalizer used on example.com:
    plesk bin site.exe --update example.com -webstat webalizer
`-webstat-protdir-access` | `true|false` | Enables/Disables access to web statistics data through password- protected directory `/plesk-stat`. Is `false` by default. | To enable access to web statistics data through password- protected directory `/plesk-stat` on the domain example.com:
    plesk bin site.exe -u example.com -webstat-protdir-access true
`-err_docs` | `true|false` | Allows/Prohibits using custom HTTP error messages on a domain. Is `false` by default (meaning standard error messages). | To allow custom error documents on example.com:
    plesk bin site.exe --update example.com -err_docs true
`-log-rotate` | `true|false` | Enables/Disables log rotation. Is `false` by default. | To enable log rotation on the domain example.com:
    plesk bin site.exe -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.exe -u example.com -log-bysize 200
`-log-bytime` | `daily|weekly|monthly` | Enables/Disables log rotation by time. Is `daily` by default. | To enable weekly log rotation on the domain example.com:
    plesk bin site.exe -u example.com -log-bytime weekly
`-log-max-num-files` | `<number>` | Limits the number of log files parameter. Is `3` by default. | To restrict the maximum number of log files (current and rotated) on the domain example.com to 10:
    plesk bin site.exe -u example.com -log-max-num-files 10
`-log-compress` | `true|false` | Enables/Disables log file compression. Is `true` by default. | To disable log file compression on the domain example.com:
    plesk bin site.exe -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.exe -u example.com -log-email admin@example.com
`-write_modify` | `true|false` | Allows or prohibits granting the Plesk IIS user and IIS application pool user the full access permission for the domain’s `httpdocs/` and `httpsdocs/` files and subfolders. This permission might be required for correct functioning of web applications. Note that this permission, when granted, might seriously compromise website security. Is `false` by default. | To allow the Plesk IIS User and IIS application pool user to write and modify files and subfolders in `httpdocs/` and `httpsdocs/` folders of example.com:
    plesk bin site.exe --update example.com -write_modify true
`-webdeploy` | `true|false` | Allows or prohibits web deploy publishing. Is `false` by default. | To enable web deploy publishing for example.com:
    plesk bin site.exe --update example.com -webdeploy true
`-iis_app_pool` | `true|false` | Allows or prohibits using dedicated IIS application pool for a domain. Is used with the `--update` command. Is `false` by default. | To allow using dedicated IIS application pool on example.com:
    plesk bin site.exe --update example.com -iis_app_pool true
`-cpu_usage` | `<integer>` | Defines the maximum CPU usage by a domain (in percent). Is used with the `--update` command. | To limit the maximum CPU usage by example.com to 3%:
    plesk bin site.exe --update example.com -cpu_usage 3
`-cpu-usage-state` | `true|false` | Switches IIS application pool CPU usage monitoring on or off. | To set up CPU usage settings for the IIS application pool of the domain example.com:
    plesk bin site.exe --set-iis-app-pool-settings example.com -iis-app-pool-turned-on true -cpu-usage-state true -cpu-usage-value 3 -cpu-usage-action KillW3wp -cpu-usage-interval 5 -max-worker-processes 3 -idle-timeout 5 -managed-pipeline-mode Integrated -recycling-by-time 60 -recycling-by-requests 1000 -recycling-by-virtual-memory 5120 -recycling-by-private-memory 10240
`-cpu-usage-value` | `<integer number>` | Specifies the maximum percentage of CPU time that worker processes in an application pool are allowed to consume over a period of time specified by the `-cpu-usage-interval` option. If the limit is exceeded, the event is written to the event log and an optional set of events can be triggered. These optional events are determined by the `-cpu-usage-action` option. | See the example for -cpu-usage-state.
`-cpu-usage-action` | `NoAction | KillW3wp` | Specifies the action that IIS takes when worker processes exceed the limit on CPU time usage. `NoAction` - no action is taken when the CPU limit is exceeded. A warning is written to the event log. `KillW3wp` - processes that exceed their CPU limit will be forced to shut down. | See the example for -cpu-usage-state.
`-cpu-usage-interval` | `<minutes>` | Specifies the reset interval for monitoring of CPU usage by worker processes. | See the example for -cpu-usage-state.
`-iis-app-pool-turned-on` | `true|false` | Turns IIS application pool for a site on or off. | See the example for -cpu-usage-state.
`-max-worker-processes` | `<number>` | The maximum number of worker processes permitted to service requests for IIS application pool. | See the example for -cpu-usage-state.
`-idle-timeout` | `<minutes>` | The amount of time a worker process will remain idle before it shuts down. | See the example for -cpu-usage-state.
`-managed-pipeline-mode` | `Integrated|Classic` | Configures ASP.NET to run in classic mode as an ISAPI extension or in integrated mode where managed code is integrated into the request-processing pipeline. | See the example for -cpu-usage-state.
`-recycling-by-time` | `<minutes>` | The period of time after which IIS application pool recycles. | See the example for -cpu-usage-state.
`-recycling-by-requests` | `<number>` | The maximum number of requests IIS application pool can process before it recycles. | See the example for -cpu-usage-state.
`-recycling-by-virtual-memory` | `<KB>` | The maximum amount of virtual memory a worker process can consume before causing the IIS application pool to recycle. | See the example for -cpu-usage-state.
`-recycling-by-private-memory` | `<KB>` | The maximum amount of private memory a worker process can consume before causing the IIS application pool to recycle. | See the example for -cpu-usage-state.
`-log_rotate` | `true|false` | Enables/Disables log rotation. Is `true` by default. | To disable log rotation on example.com:
    plesk bin site.exe --update example.com -log_rotate false
`-log_bysize` | <`number>[K|M|G]` | Enables/Disables the processing of log files by size (the processing starts once the specified size is achieved). | To enable the processing of example.com log files when their size comes up to 200 KB:
    plesk bin site.exe --update sampledomain.com -log_bysize 200K
`-log_bytime` | `daily|weekly|` `monthly` | Enables the processing of log files by time. Is `daily` by default. | To set up weekly log rotation on example.com:
    plesk bin site.exe --update example.com -log_bytime weekly
`-log_max_num` | `<number>` | Specifies the maximum number of stored log files. Is `3` by default. | To set the maximum number of log files on example.com to 5:
    plesk bin site.exe --update example.com -log_max_num 5
`-log_compress` | `true|false` | Enables/Disables log file compression. Is `true` by default. | To disable log file compression on example.com:
    plesk bin site.exe --update example.com -log_compress false
`-log_email` | `<email>` | Enables sending log files to the specified email address. | To enable sending the log file of example.com to JohnDoe@example.com:
    plesk bin site.exe --update example.com -log_email JohnDoe@example.com
`-mail_service` | `true|false` | Enables/Disables running mail service. Is `false` by default. | To disable mail service on example.com:
    plesk bin site.exe --update 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.exe -u example.com -mail_service_node 192.168.1.2
`-notify` | `true|false` | Enables/Disables sending the ‘domain created’ notification to Plesk administrator. Is `true` by default. | To disable sending the notification:
    plesk bin site.exe --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.exe -u example.com -map_ip 192.168.1.2
`-publish-sb-site` | `true|false` | Allows/Prohibits publishing site with Presence Builder. Is `false` by default. | To allow publishing site with Presence Builder on the domain example.com:
    plesk bin site.exe -u example.com -publish-sb-site true
`-asp.net` | `true|false` | Enables/Disables supporting Microsoft ASP.NET framework. Is `false` by default. | To enable Microsoft ASP.NET framework support on example.com:
    plesk bin site.exe -u example.com -asp.net true
`-asp.net_version` | `2.0|4.0` | Sets the default version of Microsoft ASP.NET framework. Is 2 `.0` by default. | To make .NET v.2.0.x default on example.com:
    plesk bin site.exe -u example.com -asp.net_version 2.0
`-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.exe -u example.com -certificate-name testcert
`-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.exe -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.exe -u example.com -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.exe -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 `--update-php-settings` only. | To set custom PHP configuration from the file my_file to the site example.com:
    plesk bin site.exe --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 `--update-php-settings` only. | To add directives to custom PHP configuration from the file my_file_add (example.com):
    plesk bin site.exe --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.exe -u example.com -outgoing-messages-domain-limit 15
`-icp-status` | `true|false` | Enables or disables the “ICP approved” status for the site. | To enable the “ICP approved” status for the site example.com and assign the ICP permit with the ID “?ICP?12345678?” to it:
    plesk bin site.exe -u example.com -icp-status true -icp-permit "?ICP?12345678?"
`-icp-permit` | `<ICP permit ID>` | Specifies the ICP permit ID for the site. |
`-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:
    elesk bin site.exe  -c example.com -hosting true -login login -passwd setup -ip 10.52.76.142 -empty-document-root true