To create a sample domain myowntest.domain.com for Client 1 on the basis of Domain template 1, with enabled anonymous FTP, follow these steps:
1. Create an XML packet describing the task, such as the following:
<?xml version="1.0" encoding="UTF-8"?>
In this packet, specify the following variables:
<name> -the full name of the domain to be created (without the http://www prefix)
<client id> -the ID number of the client for whom the domain is created in Plesk Expand.
<tmpl_id> -the ID number of the domain template on which the domain will be based.
<status>0</status>- the domain will have the "enabled" status after creation.
<ftp_login>- the FTP login for this domain account.
<ftp_password>- the FTP password for this domain account.
Note: For the operation to be successful, the domain template must use the Physical hosting hosting type.
2. Save this XML packet in a file - for example,
add_domain.xml. The file name format is arbitrary.
3. Direct the file to the standard input (
stdin) of the operator
exp_plesk_domain used for domain creation.
The query must have the following format:
exp_plesk_domain is a Plesk Management Operator responsible for domain management operations: creating a new domain, enabling/disabling a domain, setting domain limits, configuring hosting, removing a domain, etc.
For a full list of operators, refer to the Plesk Expand Operators section.
4. The output appears in the shell, in a format similar to the following:
A. Domain was created successfully
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
</status> -operation executed successfully.
</id> -the newly created domain has ID number 8.
B. Domain creation failed
Quota problem. Domains
limit was reached for this
Error: domains limit was reached for this server.