- Plesk for Linux
- Plesk for Windows
How to change a default document root for websites on Plesk for Linux?
Note: The default document root will be changed only for newly created domains. All existing domains will keep storing their files in the old location.
- Log into Plesk.
Navigate to Extensions and install Panel.ini editor extension.
Access this extension and click Editor.
Add the following section there:
docroot = "new_default_docroot"
where new_default_docroot - a directory name or a path to the directory (e.g. "public" or "domain/public"), which will be located inside the domain directory (e.g. /var/www/vhosts/example.com/domain/public/).
Click on 'Save' to apply the changes.
For more information about defining a custom document root, visit: Administrator's Guide: Defining a Custom Document Root.