1. Home
  2. Applications Management
  3. WordPress
  4. How to Fix “Your PHP Installation Appears to be Missing the MySQL Extension Which Is Required by WordPress” Error

How to Fix “Your PHP Installation Appears to be Missing the MySQL Extension Which Is Required by WordPress” Error

WordPress is regarded as a highly reliable and powerful software, but it’s not without it’s an occasional glitch. There are a handful of common issues users may face and error messages they may encounter. The “Your PHP installation appears to be missing the MySQL extension required by WordPress” error is one of those messages.

This message can be frustrating and concerning, but fortunately, there are some easy steps you can take to understand the cause of this problem better and find a solution.

In this KB article, we will discuss what this error means, why it happens, and how you can fix it.

Let’s go!

What Does “Your PHP Installation Appears to be Missing the MySQL Extension Which Is Required by WordPress” Mean?

There are a handful of reasons you might see this message on your WordPress site.

One reason is that the PHP installation on the server doesn’t have the required MySQL extension to connect WordPress to your MySQL database. It’s really important to know that support for this extension was deprecated in versions of PHP 7.0 and beyond.

If you are seeing this message, your WordPress’ site core code isn’t compatible with the version of PHP you’re using. This can also indicate:

  • MySQL isn’t installed or enabled.
  • The PHP extension is not configured correctly.
  • Your WordPress files are outdated.

This issue is widespread on server environments that don’t have MySQL installed by default, but at ChemiCloud, this is installed on our servers, so you won’t have to worry about that being the cause.

Struggling with WordPress issues? ChemiCloud is the hosting solution designed to save you time and money! 🤓 Check out our WordPress Hosting plans!

How to Fix “Your PHP Installation Appears to be Missing the MySQL Extension Which Is Required by WordPress” Error

Update Your WordPress Installation

The easiest way to fix this error and the first thing you should try is to update your WordPress installation to the most recent version. To do this, just log in to your /wp-admin and click Updates from the left:

On the Update page, look for an update to your WordPress installation:

Once you’ve updated, revisit your site and see if your issue is resolved.

If not, proceed to step 2.

Make Sure the MySQL Extension Is Installed

If updating your WordPress installation didn’t help, or you didn’t have an update to do, the next prudent step would be to check if the MySQL extension is installed and enabled.

Some operating systems don’t include the MySQL extension by default. If you’re using a custom operating system configuration, you may need to install it yourself.

You can check if the MySQL extension is installed by creating a php.info in your public_html folder.

Step 1: Open your cPanel and in the Files section, click File Manager:

Step 2: When the file manager is open, double click the globe icon next to the public_html folder to open the folder.

Step 3: When the public_html folder is open, click the + File icon in the top left of the file manager.

A modal will appear where you can give the file a name. Enter info.php and click Create a new file.

Step 4: After the file is created, single-click the file in the directory listing, then click Edit at the top:

The modal window will appear where you will be given the option to check the UTF encoding.

95% of users can proceed and click Edit.

What if I'm in that 5% of users who can't click edit?

Contact our support and let them know you installed your WordPress installation using a utf format other than utf-8 and we can help you out! Your native language, or at least the language in which you installed WordPress, probably isn’t based on the Roman Alphabet. 😉 Not to worry, we are all international here and can get you sorted!

A new window will open with a text editor:

Copy and paste the text below into the editor, then click Save Changes in the top right:

// Show all information, defaults to INFO_ALL
// Show just the module information.
// phpinfo(8) yields identical results.

Your screen should look similar to the one below:

Now, open a new tab in your browser and visit https://yourdomain.tld/info.php. You’ll see a page with the details of your PHP installation:

Look for the mysql or mysqli section. If the extension is installed, it will display the version next to Client API:

If it’s blank, the extension is not installed. Installation steps vary depending on your web host and their servers/infrastructure. You can refer to the PHP documentation and installation guides for detailed guidance.

If your host uses cPanel, you can enable the MySQL extension by clicking on Select PHP Version under Software:

After choosing the most recent PHP version, tick the boxes for “mysqli” and/or “mysqlnd”. Save your changes, then refresh your site to see if the error is resolved.

If not, proceed to step 3.

Verify the PHP Extension Is Properly Configured

If Step 2 didn’t help, it’s highly probable/likely that your PHP extension directory is not configured properly, if at all. Go back to the php.info page you created and look for “Loaded Configuration File”.

This is where you will find the value to the path, which will look very similar to the image below:

Make a note of the path value.

Next, locate the extension_dir parameter:

The entry should match up with the Loaded Configuration File path. In the above example, you’ll notice that it displays the correct extension directory path for the PHP version installed on our server.

However, if yours points to the incorrect location, you’ll need to edit your php.ini file to replace it with the correct one.

And that’s it!

These steps will help you get your WordPress site fixed; however, if you have reviewed these steps and are still unable to fix the problem, definitely open a ticket from your Client Area to contact our Support Team 24×7!

If you enjoyed this tutorial, then you’ll love our support! All ChemiCloud’s hosting plans include 24/7 support from our fantastic support team. Check out our WordPress hosting plans and have your website migrated today!

Updated on April 5, 2022

Was this article helpful?

Related Articles

Tired of struggling with troubleshooting? 🤔
If you enjoyed this article, you’ll love our support team even more! Get up to 65% off and a FREE Domain for a limited time. 👇
View Plans


  1. Hey there,

    You can perform some of the things we discussed in this KB over the WP_CLI via SSH, however you don’t specifically need Root access to do them! Thanks for the comment!

  2. You have to enter the commands on command line. You need to connect to your server through SSH using an SSH client. Log in with a user that has root privileges.

Leave a Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.