Plesk

Unable to import site: Unable to locate the document root directory of the website

Symptoms

Unable to import a website via Plesk > Domains > example.com > Website Importing:

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

  1. Log into Plesk.

  2. 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.

  3. 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.:

      https://example.com/

      OR

      https://example.com/wordpress

      OR

      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:

      /var/www/vhosts/example.com/httpdocs/

      AND

      /var/www/vhosts/example.com/httpdocs/wordpress

      AND

      /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:

Additional information

Importing Websites | Plesk Obsidian documentation

How to import a mailbox data from another server or move mailbox data between email accounts in Plesk

Exit mobile version