Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
-
WP Toolkit was updated in Plesk to the 5.12.0-6510 version.
-
WordPress menu in Plesk becomes inaccessible with:
PLESK_ERROR: Server Error
500 PleskExt\WpToolkit\Api\Exceptions\InternalServerErrorException
Could not fetch the list of WordPress installations: Can not find domain by id 123
Type PleskExt\WpToolkit\Api\Exceptions\InternalServerErrorException
Message Could not fetch the list of WordPress installations: Can not find domain by id 123
File InstallationsPrototypeController.php
Line 136 -
Domain with ID 123 is missing in Plesk GUI and in the
psa
database:# plesk db "select * from domains where id=123"
Empty Output
Cause
Product issue:
-
#EXTWPTOOLK-9555 "WP Toolkit no longer breaks down with InternalServerError in case of internal database inconsistency."
Fixed in:- WP Toolkit 5.12.1 02 August 2022
Resolution
Workaround
Update WP Toolkit to the latest version:
Workaround
-
Connect to the server via SSH.
-
Create a dump of the psa database:
CONFIG_TEXT: plesk db dump psa > psa.sql
-
Remove leftovers from the Plesk database:
# plesk db "truncate longtasks"
# plesk db "truncate longtaskparams" -
For security reasons, create a backup of the WP Toolkit database:
# cp -p /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3{,.backup}
-
Access the WP Toolkit database in SQLite:
# sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
-
Enable headers:
MYSQL_LIN: sqlite> .headers on
-
Get a WordPress instance ID using the domain ID from the error message. In this example, domainId is 123:
MYSQL_LIN: sqlite> select id from Instances where domainId=123;
id
66Note: There might be several instances, make sure to execute the next step for each of them.
-
Remove all corresponding information:
-
Using the domain ID:
MYSQL_LIN: sqlite> DELETE FROM Instances where domainId=123;
-
And using the instance ID obtained on step 7:
MYSQL_LIN: sqlite> DELETE FROM InstanceProperties WHERE instanceId=66;
sqlite> DELETE FROM InstancesDomains WHERE instanceId=66;
sqlite> DELETE FROM Instances where id=66;
-
-
Exit SQLite:
MYSQL_LIN: sqlite> .quit
-
Connect to the server via RDP.
-
Create a dump of the psa database:
C:\> plesk db dump psa > C:\psa.sql
-
Remove leftovers from the Plesk database:
C:\> plesk db "truncate longtasks"
C:> plesk db "truncate longtaskparams" -
Download a bundle of command-line tools for managing SQLite database files and extract the file
sqlite3.exe
. -
Copy the
sqlite3.exe
file to the%plesk_dir%var\modules\wp-toolkit
folder. -
Open the
%plesk_dir%var\modules\wp-toolkit
folder in the File Explorer and create a copy of the WP Toolkit databasewp-toolkit.sqlite3
. -
Start
sqlite3.exe
located in%plesk_dir%var\modules\wp-toolkit
and access the WP Toolkit database using the command:C:\> sqlite> .open wp-toolkit.sqlite3
-
Enable headers:
C:\> sqlite> .headers on
-
Get a WordPress instance ID using the domain ID from the error message. In this example, domainId is 123:
C:\> sqlite> select id from Instances where domainId=123;
id
66Note: There might be several instances, make sure to execute the next step for each of them.
-
Remove all corresponding information:
-
Using the domain ID:
MYSQL_LIN:sqlite> DELETE FROM Instances where domainId=123;
-
And using the instance ID obtained on step 10:
MYSQL_LIN:sqlite> DELETE FROM InstanceProperties WHERE instanceId=66;
sqlite> DELETE FROM InstancesDomains WHERE instanceId=66;
sqlite> DELETE FROM Instances where id=66;
-
-
Close the
sqlite3.exe
window.
Comments
0 comments
Please sign in to leave a comment.