Applicable to:
- Plesk for Linux
Symptoms
Unable to import a website via Plesk > Domains > example.com > Website Importing:
PLESK_ERROR: Unable to locate the document root directory of the website.
Possible reasons:
1. The FTP user only has access to a directory inside the document root.
For example, this can happen when migrating the website http://example.com/ if the FTP user only has access to a subdirectory of the website, e.g. http://example.com/blog.
To resolve the issue, specify the correct source document root and source website URL in the advanced options below.
2. The document root of the website is located more than three levels, deep relative, to the FTP root directory.
For example, this can happen when migrating the website http://example.com/ if its document root directory is /var/www/vhosts/my/sites/example.com/httpdocs and the FTP user root is in /var/www/.
To resolve the issue, specify the correct source document root in the advanced options below.
3. There are rewrite rules for the document root (for example, specified by mod_rewrite and the .htaccess file).
To resolve the issue, temporarily disable the rewrite rules.
Cause
Incorrect parameters are specified in the Website Import.
Resolution
-
Log into Plesk.
-
Go to Plesk > Domains > example.com > Website Importing and click the Switch to advanced mode link.
Note: change the "example.com" in the path above to the correct website name.
-
Specify the correct configuration according to the Importing Websites Guide:
-
The Source domain name has to resolve to the source server.
-
If the Source document root is specified the Files root has to remain empty.
-
The Source website URL has to start from http:// or https://.
- The Source website URL might require the www prefix in some cases.
-
If the website document root is not the default one, specify the full path in the Source website URL field, e.g.:
CONFIG_TEXT: https://example.com/
OR
CONFIG_TEXT: https://example.com/wordpress
OR
CONFIG_TEXT: https://example.com/my/wordpress
The URL has to coincide with the path on the file system. Thus, the examples above are valid if and only if the paths are the following:
CONFIG_TEXT: /var/www/vhosts/example.com/httpdocs/
AND
CONFIG_TEXT: /var/www/vhosts/example.com/httpdocs/wordpress
AND
CONFIG_TEXT: /var/www/vhosts/example.com/httpdocs/my/wordpress
-
Make sure that the user specified in the Hosting access section is able to connect to the website via FTP or SSH corresponding by using the Username and Password specified at this page.
Here is an example of the correct configuration:
-
Comments
11 comments
I really don't understand this Tool.
This worked only once Plesk to Plesk. Nothing else.
No Strato, no 1und1 and Host Europe or ALL INKL.
Nothing. Regardless what Settings I set, i tried EVERYTHING.
Why do you have this Tool, how can it be used if not transfering Sites? ^^
I tried this on several Serves, seems not working at all. There's a connection but nothing more. Second Step always fails.
I am not direkt partnered with Plesk.
@... Ekaterina Babenko this tool clearly needs to be reworked and the instructions need improvements (tested on 18.0.27):
Thanks in advance for filing the change requests / bug reports, and improving the manual. Also, until PMT-4498 (https://support.plesk.com/hc/en-us/articles/360007391054) is fixed, you should visibly provide instructions within the tool how to clean up after a successful migration.
info.log part for the last item:
[2020-07-23 00:00:00][INFO] Check URL 'https://example.com/'
[2020-07-23 00:00:01][ERROR] A web page returned by the source server has no HTML title.
The web page URL: https://example.com/.
[2020-07-23 00:00:02][INFO] FINISH: Check migrated applications
Bulat Tsydenov Thanks for the update. Unfortunately, I do not have any non-SSL site to import right now and not the time to reproduce it. Let's hope the bug is fixed now...
Hi B Pfleging!
Sorry for delayed response and thank you for detailed feedback.
> At least in the German translation, when you open the Import tool, the heading shows a link to "switch to simple mode" even though the simple mode is selected. If you follow the link, the advanced mode will be shown, but the link text always remains the same.
I reported it to responsible department, it will be fixed in future updates.
> The wording source domain name is misleading. If transferring a domain "example.com", I would assume that I need to enter this domain name here. However, it turns out that you refer to the source (FTP/SSH) host name here. This is not clear at all and needs to be fixed. Especially with commercial hosting companies, the FTP server name is often completely different to the actual domain name.
> In my case, I tried to import a website from a server where the (virtual) root directory for the FTP server does not coincide with the actual server root directory (and where the HTTP docroot is a subdirectory of that virtual root (e.g. /example.com where the actual path name in the server file system would be /var/www/clients/clientXY/example.com). I interpreted the instructions of the import tool such that in this case, I would need to set the "source document root" to "/example.com". Instead, I actually had to provide this as "files root". This is completely misleading. So please improve the descriptions (and do so without asking me to file a request on uservoice.com! This is a clear usability BUG and not a feature request).
I will bring these both items to developers' attention.
> When connecting via FTP, there is no chance to select connection parameters (e.g. to avoid insecure plain FTP and require FTPS).
We have an internal request to implement it in future releases, however, I cannot say for sure when exactly it will be released.
> When importing from a non-HTTPS site (Wordpress), the validation of the import fails as it tries to open the HTTPS source site (which is non-existent, see log below).
I've just tried to reproduce it, I installed Wordpress and disabled HTTPS for the domain. As a result, Site Import extension showed me this:

So, I continued and it worked fine. It would be great if you share exact steps to reproduce the issue if it is still reproduced.
I tried in all the maniers but gives me the same problem.I'm using prestashop 1.7.6.1 and doesn't work the resolution writed up. i didnt have a public_html and files are dierctly in /www.mysite.it
I was behind Cloudflare and changing the a record from proxied to dns only solved the problem.
@Brian Chin Thanks for sharing!
@Lenor,
Hello!
In case nothing helps, I suggest submitting a ticket to Plesk support to find the cause of the issue.
Hi @Eris, Please make sure /www.mysite.it is set as Document root in Domains > example.com > Hosting Settings. If not could you please open a support ticket with us by following this guide https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support-.
@Lenor,
You may purchase a support subscription. The first month is for free.
Please sign in to leave a comment.