Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress
WordPress is an incredibly powerful and reliable platform for managing your website. But one of the most common errors is “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”
Generally, this error means that something is going wrong with the code on your site and something is preventing WordPress from being able to connect to its MySQL database. And this happens when your site’s PHP code is not compatible with the PHP version the site is running on.
What Causes “Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress”?
It means the PHP installation on your server doesn’t have the required MySQL extension to connect WordPress to your MySQL database. Support for this extension was deprecated in versions of PHP 7.0 and above. Specifically, this error means that the PHP on your server doesn’t have the necessary extension to connect your WordPress site to its MySQL database.
There are three main reasons why this might be the case:
- Your WordPress files are outdated
- You are using PHP 5.6 or Lower
- The MySQL extension isn’t installed or enabled
How to Fix “Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress”
Now that you know what’s going on, you may want to reach out to your hosting provider for assistant to fix the issue. The method you should use to fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” as belows.
- What Version of PHP using
- Update the WordPress core
- Check to See If the MySQL Extension Is Installed
What Version of PHP using
If your PHP version starts with a “7”, that usually means that you need to update your WordPress to the latest. However, if you’re still using PHP 5.3, you might download the older WordPress version such as WordPress 3.6 and upload it to your root folder.
Please take note, we strongly recommend using the latest version of PHP. If you are using our managed wordpress hosting, we don’t support versions below PHP 7.3. These older versions have slower performance and they are no longer receive security updates, which have a security risk to your site.
Update the WordPress core
Several isssues can cause the WordPress error missing mysql extension. You can resolve by running an update in the WordPress dashboard.
To update WordPress:
- Log into the wp-admin page of your website.
- Click the Updates link in the upper-left corner. The page displays available updates.
- Click the Update Now button.
If your installation is up-to-date, WordPress offers an option to reinstall the current version.
Check to See If the MySQL Extension Is Installed
If your are using cPanel or Plesk, you can use the cPanel or Plesk File Manager tool. Once you’ve connected to your server, create a new file called phpinfo.php in the root directory of your WordPress site. Then, edit the file and add the following code snippet:
Once you save the file (and re-upload the saved version if needed), navigate to domain.com/phpinfo.php, making sure to replace domain.com with your actual domain name. Look for a section named either mysql or mysqli.
If the MySQL extension is installed, you should see a version number next to the Client API library version item. If you can’t find this information, that means the MySQL extension is not installed. The best solution is usually to reach out to your host’s support staff and ask them to install it for you.