Plesk

Unable to rename the domain: A virtual directory with the specified name already exists

Symptoms

Renaming a domain in Plesk fails with the following error:

Error: Unable to rename the domain: A virtual directory with the specified name already exists.

Cause

The directory chosen as a Docroot for the domain already exists.

Resolution

  1. Log into Plesk

  2. Rename the folder with the same name in the Home directory in Subscriptions > example.com > File Manager:

    Alternatively, set another unique name for document root of the new domain.

Additional steps for Plesk on Linux

  1. Connect to the server via SSH

  2. Rename the folder with same name at /var/www/vhosts/system/ with the following command:

    # mv /var/www/vhosts/system/rename.example.com/ /var/www/vhosts/system/rename.example.com_renamed/