Plesk

WordPress instances marked as broken in: Plesk WP Toolkit has found WordPress files at the following path

Symptoms

Cause

The WordPress content tied to this domain was moved manually to a different directory, due to which the WP Toolkit database has not been updated with information about this change. The directory mentioned in the error message is actually missing on the server or no files can be found inside:

# ll /var/www/vhosts/example.com/httpdocs/wordpress:
ls: cannot access /var/www/vhosts/example.com/httpdocs/wordpress:: No such file or directory

Resolution

Note: WP Toolkit entries for all existing WordPress installations are not connected to the websites themselves, due to which detaching a WordPress installation from the WP Toolkit does not alter any files or databases for the related WP installation, but only alters records tied to this installation in the WP Toolkit database.

1. Log into Plesk

2. Go to Domains > example.com > WP Toolkit
3. Press on the three vertical dots on the top right of this domain entry in the WP Toolkit

4. Press Detach

Afterwards, in order to attach the same WP installation back to the WP Toolkit in Plesk, so that it can acquire the updated Document root information, you need to do the following:

Note: You must also make sure that the Document root for the domain is configured properly in Plesk > Domains > example.com > Hosting & DNS > Hosting

1. Log into Plesk
2. Go to WordPress
3. Click Scan

In case Plesk for Linux is used

  1. Connect to the Plesk server via SSH.
  2. Create a dump of the Plesk database 

  3. Create backup of WP Toolkit database:

    # cp -p /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3{,.backup}

  4. Remove leftovers of affected instance from WP Toolkit database:

    # sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
    # sqlite> .headers on
    # sqlite> select instanceId from InstancesDomains where domainId=123;
    instanceId
    567
    # sqlite> DELETE FROM InstanceProperties WHERE instanceId=567;
    # sqlite> DELETE FROM InstancesDomains WHERE instanceId=567;
    # sqlite> DELETE FROM Instances where id=567;
    # sqlite> .quit

In case Plesk for Windows is used

  1. Connect to the server via RDP
  2. Create a dump of the Plesk database 

  3. Download sqlite3.exe from this link into C:temp
  4. Create copy of WP Toolkit database, located in %plesk_dir%varmoduleswp-toolkitwp-toolkit.sqlite3

  5. Open cmd.exe as Administrator and remove…