@Kaspar Let's assume you have a site example.com which is associated with a corresponding subscription
- (www.)example.com as the main domain of the subscription currently runs any type of website/CMS, but no Wordpress, using current.example.com as document root
- While developing the new Website (e.g. with Wordpress), you create a staging site testing.example.com which is hosted in subdirectory new.example.com as document root
Once the client decides to switch to the new system, I would update the hosting settings, i.e. change the document root of (www.)example.com to new.example.com.
- while changing subdomain names (e.g. from new.example.com to old.example.com) would be possible, this does not seem to be the case for "renaming" testing.example.com (subdomain) to example.com (main domain). Thus, I have to change the hosting settings of example.com instead and point to the right directory (new.example.com)
- once the main domain works as expected, you would want to remove the subdomain testing.example.com. If you do not change the document root beforehand, this would delete the directory new.example.com, which still serves as document root for example.com.
- In order to be able to remove testing.example.com, I first need to point the document root of that subdomain to a new, empty temporary folder and then delete the subdomain.
To avoid this, I see two things that should be implemented:
a) The option to delete a (sub) domain WITHOUT deleting the associated content (folders, databases etc.), i.e. offer "delete domain + content" and "delete domain but keep content".
b) When the user clicks the "delete" link, Plesk should check if the document root (or any of its sub folders) is used by any other (sub) domain in this subscription. If this is the case, the option "delete domain + content" should be disabled and a warning should appear that explains which (sub) domains are still using the content.