# Fix "missing the MySQL extension" in WordPress
Source: https://docs.webgee.com/en/hosting/wordpress/outdated-missing-mysql-extension-for-wordpress







Fix either of these WordPress errors. Applies to shared, reseller and Premium
hosting.

> Your PHP installation appears to be missing the MySQL extension which is
> required by WordPress.

Or, in **Tools → Site Health**:

> utf8mb4 requires a newer client library

Both mean the same thing: PHP cannot talk to MySQL properly because the right
extension is not enabled.

## Enable the extensions [#enable-the-extensions]

1. In cPanel, open **Select PHP Version**.

   <img alt="The Select PHP Version tool in cPanel" src="__img0" />

2. Select the **Extensions** tab.

   <img alt="The Extensions tab showing MySQL extensions" src="__img1" />

3. Enable **nd\_mysqli**.

4. Enable **nd\_pdo\_mysql** as well.

<Callout type="warn">
  `mysqli` and `nd_mysqli` cannot both be on — nor can `pdo_mysql` and
  `nd_pdo_mysql`. If the `nd_` version will not tick, **untick the plain one
  first**, then enable it. Trying to enable both is why this often looks like it
  did not work.
</Callout>

The `nd_` variants are the mysqlnd-based drivers. They are what support
`utf8mb4`, which is why the Site Health warning clears once they are on.

## Check it worked [#check-it-worked]

Reload your site — the error should be gone. Then open **Tools → Site Health →
Info → Database** and confirm the extension shows as `mysqli` with a recent
client version.

## If the error persists [#if-the-error-persists]

* **The change was made on the wrong PHP version.** If your site runs a
  different version from the account default, select that version first, then
  set its extensions.
* **A cached page is being served.** Hard-refresh, or clear your caching plugin.
* **The credentials in `wp-config.php` are wrong.** That produces a similar
  failure — see
  [Move a local WordPress site to your hosting](/en/hosting/wordpress/deploy-local-wordpress-setup-into-your-cpanel-account).

## Related [#related]

* [Change your PHP version and settings](/en/development/change-php-version)
* [Create and manage MySQL databases](/en/databases/how-to-create-and-manage-mysql-databases-in-cpanel)
