Symptoms
You access the WP Toolkit page in WHM and observe that it fails to load with this error:
Error: Initial data load error: some required fields are not provided
Description
This can commonly be caused by corruption in the /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3 database file that WP Toolkit uses.
This can also occur if the locale of the server is set to one that is not compatible with the PHP: ucfirst function. We have reported this incident to the Plesk WP Toolkit Developers and they have opened the case EXTWPTOOLK-7648 to fix this cause.
Update: This issue is resolved in WP Toolkit version 5.6.0.
"[-] (cPanel) It is now possible to install WP Toolkit on a server with Turkish locale (tr_TR). (EXTWPTOOLK-7648)"
Workaround
This issue was resolved in WP Toolkit version 5.6.0, so you will want to ensure WP Toolkit is updated to its latest version:
- CentOS, AlmaLinux, Rocky Linux, CloudLinux 7
yum update wp-toolkit-cpanel
- AlmaLinux, Rocky Linux, CloudLinux 8+
dnf update wp-toolkit-cpanel
- Ubuntu
apt install --only-upgrade wp-toolkit-cpanel
If the above task does not resolve the error, you will need to verify if your server is running an alternative locale that may be incompatible(ie. Turkish). The following is an example output of a default en_US locale.
# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
...
If your server is not using the en_US locale, this can be overridden for the sw-engine service in the startup configuration. To make this change, you will add the following line to the file '/usr/lib/systemd/system/sw-engine.service'.
Environment=LANG=en_US.UTF-8
This should be added at the bottom of the section labeled [Service] and would be expected to appear as below.
[Service]
Type=notify
PIDFile=/run/sw-engine.pid
ExecStart=/usr/sbin/sw-engine-fpm --fpm-config /etc/sw-engine/sw-engine-fpm.conf -c /usr/local/psa/admin/conf/php.ini --nodaemonize --pid /run/sw-engine.pid
ExecReload=/bin/kill -s SIGUSR2 $MAINPID
# `rm -rf /dir1/dir2/*` doesn't work in systemd unit
ExecStopPost=-/usr/bin/find /run/lock/lmlib/ -mindepth 1 -delete
KillMode=process
Environment=LANG=en_US.UTF-8
Once this change has been made, you can apply it by reloading the service using the commands below.
systemctl daemon-reload
systemctl restart sw-engine
Comments
0 comments
Article is closed for comments.