• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Plesk bin commands

MartinT

Basic Pleskian
Server operating system version
Debian 12.7
Plesk version and microupdate number
latest
Hi I have a site with many Subdomains. In past I created them each via CLi

plesk bin domain -c subdomain.domain.com -owner admin -service-plan "Unlimited" -ip xx.xx.xx.xx.xx.xx..xx -login sub1 -passwd "12345"
this created a new subscription. Now I plan to migrate the domains to another server and plan to it a bit different.
In the end the subdomains should also be created, but not as a subscripttion, only as under root domain.#
Could this work?:

plesk bin subdomain -c subdomain.domain.com -owner admin -service-plan "Unlimited" -login sub1 -passwd "12345"​

IP should be same under root domain so I deleated it form command and I changed domain to subdomain in the beginning.
 
You can use the Plesk feature to move websites between subscriptions. However, you will have to change the document root from httpdocs to something subdomain specific, in each subscription, before you move.

1731399916769.png

You can move subdomains added as subdomains in Plesk. However, you can move subdomains added as domains. If you wish to go from subdomain added as a domain to a subdomain then you complete the move, remove the domain from the parent subscription then add it back as a subdomain (the document root of the subdomain added as a domain shouldn't be removed from the webspace. A tar archive and an SQL dump might prove useful before you remove the subdomain added as a domain).

https://support.plesk.com/hc/en-us/...-move-a-domain-between-subscriptions-in-Plesk might also prove useful.
 
Ok, but I want to create everything before server switch, so is it possible to create the subdomains under the Main domain via CLI and plesk bin order?
Another reason is to build up everything clean without data which is not used any more. A migration will keep them.
 
If you wish to create the subdomains as subdomains, use:
Code:
plesk bin subdomain --create subdomain -domain example.com -hard_quota 1G -ssi true -php true -ssl true

If you wish to create the subdomains as domains in the same subscription, use:
Code:
plesk bin site --create example.com -webspace-name testdomain.tst -hosting true
 
Back
Top