Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
-
WordPress 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 "WordPress Toolkit no longer breaks down with InternalServerError in case of internal database inconsistency."
Fixed in:- WordPress Toolkit 5.12.1 02 August 2022
Resolution
Workaround
Update WordPress 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 WordPress Toolkit database:
# cp -p /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3{,.backup}
-
Access the WordPress 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 WordPress Toolkit databasewp-toolkit.sqlite3
. -
Start
sqlite3.exe
located in%plesk_dir%var\modules\wp-toolkit
and access the WordPress 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
3 comments
Novità sulla risoluzione?
This was a rough issue as we had close to 100 blank instance db entries. It doesn't always throw an error if the first Instance is an actual website. We cleared it down to the first actual site and it worked, but it loaded very slowly. There were still blank instances in there. It's probably trying to process those, but not erroring for some reason. I hope the new version rebuilds all the lookup tables as we just removed the entry in instances.
After Update to WordPress Toolkit Version 5.12.1-6516 i get this error too:
[panel] Dangling resource reference detected for application resource with ID 2860041e-7a1b-4f0a-aa47-7011df3babf1
And find a installed Wordpress does not work. It was missed by user.
Please sign in to leave a comment.