Plesk is installed on a CloudLinux server.
When installing WordPress via WP Toolkit, the operation fails with the following error message:
PLESK_ERROR: PHP Fatal error: Uncaught Error: Call to undefined function json_encode() in /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/wp-cli/vendor/mustache/mustache/src/Mustache/Engine.php:637
When scanning or refreshing a WordPress instance in WP Toolkit, one of the following happens:
the operation completes with the following error message and the instance is marked as broken:
PLESK_ERROR: Your PHP installation appears to be missing the MySQL extension which is required by WordPress. PHP Fatal error: Uncaught Error: Call to undefined function json_encode() in /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/wp-cli/php/class-wp-cli.php:742
the instance is marked as broken and the following error message appears in
ERR [extension/wp-toolkit] Failed to reset cache for the instance #X, reason: Error establishing a database connection.
This is a WP Toolkit bug with ID EXTWPTOOLK-4371, which will be fixed in future product updates.
PHP extensions like json.so and mysqli.so for Alt-PHP by default are disabled so that Alt-PHP can be used in conjunction with Plesk PHP Selector. More information may be found in CloudLinux documentation.
Apply one of the following workarounds: