PHP Installation Missing the MySQL Extension

Don’t be worried about the error message saying “Your PHP installation appears to be missing the MySQL extension.” Our guide walks anyone through a quick fix.

PHP Installation Missing the MySQL Extension

Few things obstruct your productivity more than a site error message. Whether first sitting down to a day full of tasks or trying to knock out something quickly, learning your site isn’t functioning properly can derail your to-dos entirely and cause full-blown panic until you troubleshoot the issue. But, if your WordPress site is displaying a message stating, “Your PHP installation appears to be missing the MySQL extension which is required by WordPress,” don’t worry. We’ve got your back.

This common error likely means you only need to perform a simple update. It can be fixed within a couple of minutes to help you return to work and keep your site running optimally. 

Here’s our quick-yet-comprehensive walkthrough that will help you do exactly that.

PHP and MySQL Refresher

Before jumping into the troubleshooting basics for an error message stating: “Your PHP installation appears to be missing the MySQL extension which is required by WordPress,” let’s run through a brief refresher on PHP and MySQL:

  • PHP – A general-purpose programming language most commonly used for web applications. WordPress and its functionality are written with PHP. The language is periodically updated, and the most recent version of PHP is 8.1.
  • MySQL – An open-source relational database management system (RDBMS) that runs on structured query language (SQL) and is used to create, modify, or extract all of your data, which is stored in database tables. Essentially, that’s the fancy way of saying it stores your website options, settings, and content.

Fortunately, WordPress makes site management easy enough that you don’t need to get into the nitty-gritty technical details. Anyone can easily fix this issue from their WordPress Dashboard or by following the step-by-step guide further below. 

But it does help to know the actors involved in this error when you’re troubleshooting it!

What Does “Your PHP installation appears to be missing the MySQL extension” Mean?

This common error message means the version of PHP that your site runs on—and the version of MySQL you use— are suffering from a disconnect. There’s merely a missing or misconfigured extension within your PHP installation that—when operating correctly—enables your site to connect to MySQL and access the data stored in your WordPress database.

It’s a simple mismatch between the versions you’re running for each, and the error can almost always be solved with the proper update or extension configuration.

Why Does the PHP and MySQL Error Occur?

Beginning with version 5.5.X, PHP deprecated—or dropped—the MySQL extension after replacing it with one for MySQLi or for PDO_MySQL. It’s as if PHP suddenly forgot MySQL’s name from that point on and draws a blank every time your site tries to call out to your database.

So, if you’re using the most recent versions of PHP and WordPress with MySQL, this error is quite common.

Alternatively, a PHP extension in versions released before 5.5.X might be misconfigured and point to an incorrect file location—much like calling out the wrong name instead of drawing a complete blank.

That means we just have to help PHP remember MySQL’s name to fix the error.

Troubleshooting the PHP and MySQL Error

Fixing your PHP and MySQL error can be done from either the WordPress Dashboard or through an FTP Client. From the Dashboard, you can only perform updates to ensure the correct versions are running. If you need to check for a misconfiguration error, you’ll need to use the FTP Client.

Additionally, keep in mind that updates improve speeds, fix functionality bugs, and patch cybersecurity vulnerabilities. So it’s always in your best interest to run the most current versions.

Dashboard Troubleshooting

There’s a quick and simple process to fixing this issue in a few steps directly from your WordPress Dashboard:

Confirm which PHP version you’re using – Although checking your PHP version won’t solve the problem, it does provide essential diagnostic information. Once you know your PHP version, it’s easier to determine whether mismatched updates or a misconfiguration is the source. You can check your PHP version by following these steps:

Click “Tools” in the left sidebar of your WordPress Dashboard to expand the sub-menu. You can also navigate to your control panel for your PHP version number, but its location may vary depending on your hosting provider and which control panel you’ve integrated with your site (e.g., cPanel).

Click “Site Health” from the options below “Tools.”

Screen grab of the WordPress menu, showing Tools and Site Health to help fix the MySQL extension error message

Check whether WordPress recommends you update your PHP version. If so, this will be listed under “Critical Issues,” and it will also display your version number. Versions above 5.5.X are probably missing the extension, while versions below have a misconfiguration that needs fixing. If you can’t find your version number, you can contact your hosting provider for it.

Screen grab of the WordPress menu, showing WordPress Updates links

Confirm which WordPress version you’re using – As outlined above, this PHP and MySQL error message likely comes from incompatible versions. So, the next step is to see if your version of WordPress needs updating:

Click “Updates” in the left sidebar of your WordPress Dashboard, located toward the top and just below “Home.” If you see a red circle with a number inside of it, that’s how many updates you have awaiting installation—but they may not be for your WordPress version.

If a newer version of WordPress is available, click “Update Now” to begin the installation. Important note: If your WordPress installation hasn’t been updated in quite some time, the likelihood of this update process breaking your website is quite high. We recommend using a staging site or contacting our team for assistance updating WordPress.

Screen grab of the WordPress dashboard highlighting the WordPress core update button.

Similarly, check the “Updates” page to see if any of your plugins and integrations require updating, as they may contribute to the issue.

With your WordPress and PHP versions updated, the “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” message should disappear.

Using Your FTP Client

File Transfer Protocol (FTP) allows you to transfer files over the internet, including from the machine or device you’re working on to your hosting server. FTP Clients are applications that facilitate the transfer. That means you can use your FTP Client to request information about your WordPress site directly from the hosting server.

To do that, simply:

  1. Log into your FTP Client.
  1. Open your “public_html” folder—your root WordPress directory folder that contains all other directories and files.
  1. Create a new file in the “public_html” folder named “phpinfo.php” and open it to edit the contents. Critically, remember to delete the “phpinfo.php” file once you’ve finished troubleshooting to prevent anyone from discovering essential configuration data about your site. Leaving that file is a massive cybersecurity risk.
  1. Add “<?php phpinfo(); ?>” to the file.
  1. Open your web browser and enter your WordPress site’s URL, followed by “/phpinfo.php” (e.g., mywordpresssite.com/phpinfo.php).
  1. The page your web browser should display will contain extensive information about your website’s PHP installation. In the top left corner of the page, you should see your PHP version number. As mentioned above, any version that is 5.5.X or higher is likely missing an extension that is fixed with a version update, while any below is likely misconfigured.
Screen grab of PHP Info screen showing the mysqli extension. Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Your WordPress version can be updated from your Dashboard (as described above) or directly through your FTP Client. To do so, download the latest version from https://wordpress.org/download/ and follow the instructions provided by WordPress’ support documentation.

Troubleshooting with cPanel

Using cPanel is another method to troubleshoot the PHP and MySQL error, but not every WordPress site has access to it. Some hosting providers include it with their service as an easy-to-use dashboard interface for site management, but others may offer their own custom dashboards instead.

If you’re using cPanel, you can navigate and log into your dashboard and scroll down until you find the “Software” tab. There, you’ll find an icon named “Select PHP Version.” Clicking this icon will tell you which version is running, provide you with a dropdown list to update PHP for your site, and allow you to select your extensions from a list.

Screen grab of PHP version chooser in cPanel.

When updating your PHP to a version more recent than 5.5.X, you’ll need to check the “mysqli” and “mysqlnd” extensions.

Running PHP Version 5.5.X or Earlier

If you’re running a version of PHP that should still connect seamlessly with MySQL, you’ll need to check that extension’s configuration to ensure it’s properly set up. You can do that by following these steps:

Return to your “/phpinfo.php” web page, and locate the row for “Client API version” in the “MySQL Support” section.

PHP Version selector for php.ini file.

If no information is present in this row, your MySQL extension is missing and must be installed by you or your hosting provider. Alternatively, the MySQL extension won’t be necessary if you update to the latest PHP version.

PHP extension list.

Misconfigured PHP Extension

If you’re running the latest versions of PHP and WordPress, you can ensure your extension is properly configured by looking for the “Loaded Configuration File” and “extension_dir.” rows. The file path values in these fields should match identically.

However, if they don’t match, you can fix this by:

  1. Returning to your root WordPress folder (i.e., “public_html”) and opening the “php.ini” file.
  1. Replacing the file path listed with the value displayed in the “Loaded Configuration File” field.

If you’ve completed all of these steps—ensuring compatible versions and configurations—and the error message persists, you’ll need to contact your hosting provider or a WordPress support provider like us at SiteCare.

And again, remember to delete your “/phpinfo.php” file once you’ve finished troubleshooting to protect your website. You don’t want your site information and configurations available to anyone who might try directly navigating to that URL.

Troubleshooting WordPress Errors with SiteCare

Some error messages and WordPress site issues like “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” prove to be major problems (despite being easy fixes). Others may require extensive support to remedy.

Either way—if you’re not technically inclined or simply don’t want to risk worsening your site troubles by mistake, that’s what SiteCare is here for.

Our team of experts provides full-service WordPress support, from back-end management to SEO strategies that boost your page visits. We’re the all-in-one WordPress service that enables anyone to elevate their brand and website.

Contact us today to find out how we can take site management and SEO out of your hands so you can get back to what drives your business.

Ryan Sullivan Avatar
Chief of Staff

9 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

Diagnose and Optimize Your Site 

Get Your Free WordPress Health Score

Share to...