Fixed: Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress

Table of Contents

Are you seeing this error on your WordPress site:

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

Fortunately, this isn’t really that hard to fix. I’ll give you three things you can do to easily fix this problem.

Primarily, this error can be caused by the following (which are also the things we will be fixing):

  • Outdated WordPress files
  • Outdated PHP version
  • Improperly configured PHP extension

Fix #1: Update Your WordPress Installation

It’s possible that outdated WordPress software in your website has triggered the PHP installation error.

Right in your WordPress admin dashboard, you will immediately know if your software needs an installation.

To update your WordPress software, simply head over to the “Updates” page and click on the “Update to version #.#.#” button.

Click on the update to version 5.9.2 to proceed

If you’re in Wordify, you would also see the option to upgrade to the latest WordPress version from the “Overview” tab of the dashboard.

Tip: If you don’t want the hassle of having to manually update your software installation, enable the “Auto Update WordPress” option to “All Updates”.

Click the all updates button to enable automatic WordPress updates

If for some reason you need to manually update the WordPress version in the back end, you must download the updated version of WordPress on this site first:

After downloading the file, extract the zip file and delete the following files inside the folder (you don’t need to update these):

  • wp-config-sample.php
  • wp-config.php
  • wp-content folder

Once you’re done deleting those files, all you need to do now is to upload the remaining files and folders to your WordPress server through FTP (you can use FileZilla for this).

Note: It’s important that you back up your files before doing this in case something unfavorable happens. Use whatever means of backup method you have.

When prompted, make sure to overwrite the existing files and folders with the ones you have downloaded:

Overwrite existing wp-activate.php

After all your files are uploaded to the server, your WordPress will now run with the most updated version — which should fix the issue (if the issue revolves around outdated WordPress installation).

Other guides that might be able to help:

If that didn’t fix the issue, try out this next method:

Fix #2: Update Your PHP Version

If your PHP version still starts with “5”, then it’s likely that you’re missing the MySQL extension.

This is also quite easy to check either through your cPanel or in the dashboard (if you’re in a managed hosting like Wordify).

For example, in Wordify, there’s a specific page in the dashboard where you can see the PHP version that’s currently running on your site and change it as necessary:

Check PHP version in the Wordify dashboard

On the downside, if you’re using a hosting service that makes it hard for you to check the PHP version, your only choice here is to create a new file on your server.

Use a notepad application like Notepad++ and create a new file called: phpinfo.php

Inside the file, enter the following code:


It should look something like this:

Code inside phpinfo.php

Save the file and upload it to the main directory of your website (still using FTP) — to the same location where you will find the wp-config.php file.

After that, open a new tab in your browser and enter the following link (replace “yourdomain” with your own domain):

To see the PHP version, scroll down until you get to the “Core” section:

Check the core section for the PHP version

Once again, if you see your PHP version starts with “5”, then you need to update to a more recent version.

Note: If you can’t find a way to update your PHP version, then contact your web hosting provider so they can assist you.

Fix #3: Check the PHP Extension and MySQL Extension

It’s also possible that there’s something wrong with the PHP extension and MySQL extension of your site.

To check for the PHP extension, go back to the phpinfo.php page you visited earlier (discussed in fix #2 above).

Then, find and check the following whether or not they have the same extension directory path:

  • Loaded Configuration File
  • extension_dir

For example, in the image below, both the “Loaded Configuration File” and “extension_dir” have the same file directory (though differs a little in the subfolders):

Check for similarity in the loaded configuration file and extension_dir

If it’s not, access your site files using FTP and delete the php.ini file found in the path stated in the “Loaded Configuration File” and see if it fixes the problem.

You must also check the MySQL extension on the phpinfo.php page and see if you have one.

Find the “mysqli” or “mysql” section and see if there’s a version number following “mysqlnd” as shown in the image below:

Check the MySQLi category for the client API library version

Note: If you can’t find the section itself or you don’t see any version number, then you must contact your web hosting provider and ask them to install the MySQL extension for you.

This last step should solve the issue for you if the first two fixes didn’t work.

Let us know in the comments which fix worked for you or if you found an alternative fix that worked with the PHP installation problem.

Is it time for a better WordPress host?

You might also like..

Are you wasting money on your current hosting provider?

Related Posts