Perhaps, you have received an email from the WordPress Toolkit updates digest with this error below:
Website "/home/doggie/public_html" (http://doggie_domain.com: Failed to reset cache for the instance #1: Parse error: syntax error, unexpected '[' in /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/ wpt-wp-cli.php on line 10
What this error message is saying is that the cache reset command:
wp-toolkit --clear-cache
is failing for some WordPress instances.
The cause is usually caused by PHP memory_limit value.
But it can also occur when the WordPress site is missing or uses an old PHP version.
To resolve this consider these troubleshooting steps:
- increase memory_limit value: consider increasing the memory_limit value for the impacted WordPress installations from 256M to 512M. You can do this by logging in to your cPanel, scrolling down to the Software section, and selecting either MultiPHP INI Editor <(em>if you are using upstream supported PHP version) or Select PHP Version (if you are running PHP version less than 8.1).
- missing site installation: if you see this when you access the WordPress Toolkit, consider restoring the site from a backup or removing it entirely from WP Toolkit. Removal though may require opening a support ticket with our technical team. Once removed, you may opt to use Softaculous WordPress Manager instead.
- check PHP version: We removed PHP 7.4 from all production servers. For customers wishing to continue using this PHP version, please upgrade the account to one of the packages found at our End of Life PHP hosting.
- reset WP admin password: While it may not make any intuitive sense, check to ensure that your WordPress administrator login, password, or both are set. You can visit 1Password Generator and generate a good password for your WordPress website.
- check your plugins: The plugins you choose to run on your WordPress website should be compatible with the WordPress version you are running. To keep up, identify the plugin developer, then subscribe to his or her newsletter or update the log once you install a plugin.
- double check the WordPress installation: We have seen where customers install WordPress on a sub-domain and totally forget about it. One of the tasks of a hosting admin is to know exactly by heart what is running on the web hosting account. Check your File Manager, WordPress Toolkit and Softaculous to make sure that the applications you expect are the ones running.
Else, run the command:
wp core download
to redownload WordPress.