Website importing fails: Unable to locate the document root directory of the website

Created:

2017-04-12 17:47:17 UTC

Modified:

2017-08-17 15:09:08 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Website importing fails: Unable to locate the document root directory of the website

Applicable to:

  • Plesk Onyx

Note: This article has the reference to the issue with the fix available:

  • #PMT-3698 "Site migration was blocked if the source web server rejected requests without the User-Agent header."
    Fixed in:
Please consider updating your server:

Symptoms

Website importing at Plesk > Domains > example.com > Website importing fails with the following error:

Getting information
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, you cannot migrate 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, make sure that the FTP user has access to the document root of the website.
2. The document root of the website is located more than three levels deep relative to the FTP root directory.
For example, you cannot migrate 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/.
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

Site migration gets blocked if source web server refuses requests with the unknown user agent.

This is Plesk Migrator issue wit ID #PMT-3698 that will be fixed in future updates.

Resolution

As a workaround, apply a temporary fix:


  # cd /usr/local/psa
  
# wget http://autoinstall.plesk.com/panel-migrator/patches/PMT-3698
# patch -p0 < PMT-3698
Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    N8Solutions

    This worked for Plesk Onyx v17.0 but not for v17.5.

  • 0
    Avatar
    Pavel Rozental

    Hello,

    Plesk Onyx v17.0 and v17.5 have absolutely the same migrator. Probably 17.5 has another cause.

Please sign in to leave a comment.