Search
Close this search box.

WP Buffs Blog |

2-Min Fix: “Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress”

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. However, it isn’t without fault. There are a handful of common issues and error messages you might encounter, such as “Your PHP installation appears to be missing the MySQL extension which is required by WordPress“.

A 'Hey, What Went Wrong?' GIF.

When you come across this message, it can be concerning and frustrating. Fortunately, there are simple steps you can take to better understand both the cause and solution to this problem.
In this post, we’ll explain what this error message means and some of the potential reasons behind it. Then we’ll walk you through the methods you can use to resolve it. Let’s get started!

In This Article 🧐

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:

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 beyond.

This means that if you’re seeing this message, your WordPress site’s code isn’t compatible with the version of PHP you’re using. More specifically, it can indicate that:

This issue is most common with new WordPress installations, especially for certain operating systems that don’t include the MySQL extension by default, such as Linux. It may also occur when migrating a site or changing your server configuration.

How to Fix "Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress" (3 Methods) 🦸‍♂️

The method you should use to fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” will depend on a handful of factors, including the type of hosting you use. If you’re not comfortable accessing your site files via File Transfer Protocol (FTP), you may want to reach out to your hosting provider for assistance.

Let’s take a look at three potential ways you can resolve this issue:

  1. Update Your WordPress Installation
  2. Make Sure the MySQL Extension Is Installed
  3. Verify the PHP Extension is Properly Configured

1. Update Your WordPress Installation

The first and simplest solution for fixing this error message is to upgrade WordPress to the most recent version. To do this, log into your dashboard and select Updates:

The 'Updates' menu item in WordPress.
On the next screen, click on Update Now under the section for WordPress version updates:
The option to update WordPress to the latest version.

Once it’s done, visit your site again to see whether the issue is resolved.

2. Make Sure the MySQL Extension Is Installed

If updating WordPress doesn’t help, the next step is to verify whether the MySQL extension is installed and enabled. Some operating systems don’t include the MySQL extension by default. If you’re using one of them, you’ll need to install it yourself.

First, create an info.php file in the root directory (public.html) of your WordPress site via FTP. It should contain the following:

Save your file, then visit it in your browser (https://www.yourdomain.com/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:

The mysqli section of a PHP installation details page.

If it’s blank, the extension is not installed. The steps to install it vary depending on your host and systems. For detailed guidance, you can refer to the PHP documentation and installation guides.

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

The 'Select PHP Version' tool from cPanel.

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.

3. Verify the PHP Extension Is Properly Configured

At this point, if the issue still isn’t fixed, it’s likely that your PHP extension directory is not configured properly (or at all). Navigate back to the PHP info page in your browser to check by looking for “Loaded Configuration File“.

This is where you’ll find the file path value, which will look something like this:

The Loaded Configuration File section of a PHP info webpage.

Make note of the file path. Next, locate the extension_dir parameter:

The extension_dir parameter in a PHP info webpage.

The entry should match the Loaded Configuration File path. In the above example, you’ll notice that it displays the correct extension directory path for the PHP version. However, if yours is pointing to the incorrect location, you’ll need to edit your php.ini file to replace it with the correct one.

Wrapping Up 👏

While WordPress is an intuitive and stable Content Management System (CMS), it’s not uncommon to occasionally come across an error. Fortunately, most problems are easily resolvable.

In this post, we discussed three ways you can fix the “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” message:

  1. Update your WordPress installation to the latest version.
  2. Make sure the MySQL extension is installed and enabled.
  3. Verify that the PHP extension is properly configured.

Staying on top of site updates can be a time-consuming and tedious process. However, to avoid security and performance issues, it’s essential. At WP Buffs, we offer Care Plans that make maintaining and updating your WordPress site a smooth, seamless process. Whether you need technical support or simply want to save time, we’ve got it covered!

Want to give your feedback or join the conversation? Add your comments 🐦 on Twitter!

Image Credit: Unsplash.

If you enjoyed this article, then you’ll really enjoy the 24/7 WordPress website management and support services WP Buffs’ has to offer! Partner with the team that offers every aspect of premium WordPress support services.

From speed optimization services, to unlimited website edits, security, 24/7 support, or even white-label site management for agencies and freelancers, our expert engineers have your back. Bring us in as part of your team to make your site Bufftastic! Check out our plans

Curious about what we do?

Honed and proven strategies we've used successfully 500+ times to help you sell your first care plans. Action steps you can implement in minutes.

No thanks, I can already sell as many care plans as I want.
How to Sell Your Very First Care Plans Cover

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Finally, an email list that helps make WordPress simple and effective for you.

Speed & security optimization tips and detailed how-to guides with advice you can implement today.

No thanks, I already know everything about WordPress.
Speed checklist eBook cover

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Case study eBook cover (Rigorous Digital)
Case study eBook cover (MEP Publishing)
How to Sell Your Very First Care Plans Cover

Finally, get your website 99.9999% secure and loading in under 1 second.

Our free eBooks and easy-to-follow checklists will have your website fully optimized in just a few hours.

No thanks, my website is as fast and secure as I want it.

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

How to Sell Your Very First Care Plans Cover

Read about how we increased Rigorous Digital's profit margin by 23% and helped remove all website issues for MEP Publishers and their 3 complex websites.

Case study eBook cover (MEP Publishing)
No thanks, I don't need more profit and I can tackle all my WordPress issues myself.
Case study eBook cover (Rigorous Digital)

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.