Articles in this section

Notification received by Plesk administrator regarding WordPress site: Failed to reset cache for the instance: filemng: No such file or directory

Plesk for Windows Plesk for Linux kb: technical ext: wptk ABT: Group B

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Symptoms

  • Daily email "WordPress Updates Digest" is received that contains the following:

    CONFIG_TEXT: Website "/httpdocs.old/blog" (example.com): Failed to reset cache for the instance #19: filemng: Failed to change directory to /var/www/vhosts/example.com/httpdocs.old/blog: No such file or directory

  • The instance for example.com exists in WP Toolkit and is not broken.

  • Records in WP Toolkit database show, that two instances exist  for domain example.com (the same domainId with different directories):

    # sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
    sqlite> .mode columns
    sqlite> .headers on
    sqlite> select * from instances;
    id domainId path isIgnored apsInstanceId serverId guid
    18 88 /httpdocs 0 a950f380-79da-4095-afdd-862e1b9e7784
    19 88 /httpdocs.old/blog 0 0cd165cd-6777-4e01-96c7-dddeca145281

Cause

The folder /var/www/vhosts/example.com/httpdocs.old is removed manually or all the files were moved to another directory /var/www/vhosts/example.com/httpdocs.

As a result, WordPress database has not been updated with information about this change.

Resolution

Click on a section to expand

Via Plesk interface
  1. Log into Plesk.

  2. Go to the old instance in WP Toolkit and detach it:

    mceclip0.png

Click on a section to expand

Via SSH access
  1. Connect to the server via SSH / via RDP.

    Note: If direct SSH/RDP access to the server is not possible, contact server administrator for further assistance.

  2. Detach the old instance using the command below with the actual instance ID:

    # plesk ext wp-toolkit --detach -instance-id 19

 

If the above actions did not help, follow the steps below:

Click on a section to expand

Linux
  1. Connect to the server via SSH;
  2. Create a backup of WP Toolkit database:

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

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

    # sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
    sqlite> DELETE FROM InstanceProperties WHERE instanceId=19;
    sqlite> DELETE FROM InstancesDomains WHERE instanceId=19;
    sqlite> DELETE FROM Instances where id=19;
    sqlite> .quit

Click on a section to expand

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

    C:\> plesk db dump > "C:\psa_dump.sql"

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

  5.  Open Command Prompt as Administrator and execute the following command and log in  WP Toolkit database:

    C:\> "C:\temp\sqlite3.exe" "%plesk_dir%var\modules\wp-toolkit\wp-toolkit.sqlite3"

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

    C:\> sqlite> DELETE FROM InstanceProperties WHERE instanceId=19;
    sqlite> DELETE FROM InstancesDomains WHERE instanceId=19;
    sqlite> DELETE FROM Instances where id=567; sqlite> .quit

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.