Applicable to:
- Plesk for Windows
- Plesk for Linux
Symptoms
- The WordPress Instance marked as BROKEN in Plesk > Domains > example.com > WordPress the following message shown (WordPress site however is working correctly):
CONFIG_TEXT: WP Toolkit has found WordPress files at the following path: /var/www/vhosts/example.com/httpdocs/wordpress
However, it does not seem that this WordPress website is working. Try restoring the website from a backup or cleaning up the redundant files. - The following error can be found in
/var/log/plesk/panel.log
:CONFIG_TEXT: Failed to change directory to /var/www/vhosts/example.com/httpdocs/wordpress: No such file or directory
- The Document root for the WordPress installation on a certain domain was adjusted recently
- A domain was converted to a separate Subscription in Plesk recently
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.
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
- Connect to the Plesk server via SSH.
-
Create backup of WP Toolkit database:
# cp -p /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3{,.backup}
- 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
- Connect to the server via RDP
-
Download
sqlite3.exe
from this link intoC:\temp\
-
Create copy of WP Toolkit database, located in %plesk_dir%var\modules\wp-toolkit\wp-toolkit.sqlite3
- Open cmd.exe as Administrator and remove leftovers of affected instance from WP Toolkit database:
C:\> "C:\temp\sqlite3.exe" "%plesk_dir%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
Comments
0 comments
Please sign in to leave a comment.