Question
How to change the document root for a single domain on Plesk for Linux?
Answer
It is possible to change the document root using the following steps:
via Plesk
- Log into Plesk
- Go to Domains > example.com > Hosting Settings
- In the Document root field specify the required name for the new document root
- Press the OK button
via CLI
1. Log in to Plesk via SSH
2. Use the following command to customize the document root:
# plesk bin domain -u example.com -www-root httpdocsnew
Note: ‘httpdocsnew’ in this example is relative to the subscription root /var/www/vhosts/example.com/
. In other words, the absolute path to the new directory is /var/www/vhosts/example.com/httpdocsnew
.