Accessing the WP Toolkit User Interface via WHM » Plugins » WP Toolkit returns the following error:
Error: Request failed with status code 403
This error is typically caused due to the wp-toolkit.sqlite3 database being corrupt or missing data.
To verify this is the case you'll need to search the wp-toolkit main log for the error
database disk image is malformed.
You can find more by searching the main WP Toolkit log:
# grep "database disk image is malformed" /usr/local/cpanel/3rdparty/wp-toolkit/var/logs/main*.log | tail -n1
Next Zend_Db_Statement_Exception: SQLSTATE[HY000]: General error: 11 database disk image is malformed in /usr/local/cpanel/3rdparty/wp-toolkit/lib/zf1/library/Zend/Db/Statement/Pdo.php:61
If the error is present you'll need to verify if the wp-toolkit database is missing data.
This can be done by ensuring that all of the following tables are present which can be done with the following command:
# /usr/local/cpanel/3rdparty/bin/sqlite3 /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3 ".tables"
InstanceProperties PluginVersions SmartUpdateRunStatistics
Instances Plugins StatisticsMeasurements
InstancesDomains PluginsInstances ThemeVersions
JwtRefreshTokens RemoteInstanceLogItems Themes
JwtSignKeys RemoteServers ThemesInstances
LongTaskParams ScheduledTasks UserSettings
LongTaskUser Sets Users
LongTasks SetsPlugins settings
PhinxMigrations SetsThemes version
If there is no output, a table is missing or the database is corrupt then you'll need to reinstall the WP Toolkit which will recreate this database.
To reinstall WP Toolkit you will need to reinstall the wp-toolkit-cpanel RPM which can be done with the following command:
# yum reinstall -y wp-toolkit-cpanel
Once the above command completes the WP Toolkit User Interface will function as expected.