Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to change a default document root for all new websites in Plesk?
Answer
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.
-
Go to Extensions and install the Panel.ini editor extension
-
Access this extension in Extensions > My extensions > Panel.ini Editor > Open and click on Editor.
-
Add the following section on top of the editor view:
CONFIG_TEXT: [domainManagement]
docroot = "new_default_docroot"Note: Here new_default_docroot is a directory name (
public
) or a path to the directory (domain_files/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.
Comments
4 comments
Not helpful.
It is really hard to search for Plesk windows. I always get result of plesk Linux.
Hi @Asad Mahmand!
I have updated the article and now it contains information for both Linux and Windows.
It doesn't work on windows.
I agree with previous user, it's really hard to find info for windows
Hi @Myriam,
I have just tested it on both OSes and it works on my test server. If it is not working for you for some reason, please submit a ticket to technical support to investigate it: https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support-
Please sign in to leave a comment.