Step-By-Step Guide To Fix “Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress”

MySQL

Having trouble installing WordPress or visiting the WordPress website? Is this “Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress” keep popping up? Well, you’re not alone. Luckily, this step-by-step guide will certainly help you better understand this problem and fix it, and prevent that from ever happening again.

UnderstandingThe Reason Behind “Your PHP Installation Appears To Be Missing The MySQL Extension Which Is Required by WordPress”🤔

There are several reasons behind this “Your PHP Installation Appears To Be Missing The MySQL Extension Which Is Required by WordPress” message being prompted on your screen.

It simply means that your PHP installation doesn’t have a MySQL extension required to connect your WordPress website to your MySQL database. The extension doesn’t support PHP versions of 7.0 and below.

So, if this error is prompted on your screen, it means the code of your WordPress website doesn’t match with your current PHP version. And there are three main reasons behind that:

  1. You have outdated WordPress files
  2. You didn’t install or enable MySQL extension
  3. You didn’t properly configure the PHP extension.

This issue occurs in new WordPress installations, especially when it comes to certain operating systems that don’t set MySQL extension as a default setting like Linux. The error can also occur due to migrating your website or making changes to your server.

How To Fix “Your PHP Installation Appears To Be Missing The MySQL Extension Which Is Required By WordPress” In 3 Simple Methods 🦸‍♂️

There are many factors involved in fixing “Your PHP installation appears to be missing the MySQL extension required by WordPress” That includes the type of hosting you are using. If you don’t want to access your files through (FTP), you should consider contacting your hosting service provider.

Here are the three best ways to fix this issue:

  1. Install WordPress To The Latest Update
  2. Verify The Installation Of MySQL Extension
  3. check whether PHP Extension Is Configured Properly

1. Install WordPress To The Latest Update

One of the authentic methods of solving the “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” error is simply by updating your WordPress to the latest version. All you need to do is sign-in to your dashboard and click on Updates.

You probably are using an outdated version of WordPress, so there will be an option of “Update Now” on the screen. Click on it and wait for the update to complete.

Now, just your website again to check if it’s resolved or not.

2. Verify The Installation Of MySQL Extension

If nothing happens when updating your WordPress to the latest version, the next course of action is to ensure the MySQL extension’s installation. As we said, some operating systems like Linux do not have the default settings of the MySQL extension. So, if you have Linux, you have to install the extension yourself.

First of all, you need to create a file, i.e.,info.php, in the root directory (public.html) of your website via FTP. The file should have the following:

<?php

phpinfo( );

?>

 

Save the created file, then copy and paste it to the web browser. There, you will see a list of details on the page of your PHP installation.

Now find the MySQL or MySQLi support, where you will find whether the extension is installed or not. If it’s installed, you will find the version right beside the Client API library version.

On the other hand, if it doesn’t show anything, it means that you need to install the extension by yourself. Installation of the extension of several other factors.

It’s quite easy to enable MySQL extension if your host happens to use cPanel. All you need to do is to go to Software and click on Select PHP Version.

Once you have selected the latest PHP version, check all the “MySQLi” and/or “Mysqlnd” boxes. Save it and refresh your website to verify whether the issue is resolved or not.

3. Check Whether PHP Extension Is Configured Properly

If you’re reading this part, then the issue “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” still hasn’t been resolved. It probably means that you need to configure your PHP extension directory. For that, you need to return to the PHP info page in your web browser and find “Loaded Configuration File.”

Here, you will see the file path value that will be displayed like this:

Configuration File (php.ini) Path /usr/local/php73/lib
Loaded Configuration File /usr/local/php73/lib/php.ini

Then find the extension_dir parameter that will look something like this:

extension_dir /usr/local/php73/lib/php/extensions /usr/local/php73/lib/php/extensions

The Loaded Configuration file path should match the entry mentioned in the example above, showing the PHP version’s correct file path. If it’s not the case with yours, you have to edit your php.ini file and replace it with the correct one.

Conclusion👏

WordPress is one of the most active CMS; nonetheless, it is also prone to errors sometimes. Luckily, most of the issues are easily resolved.

In this blog post, we have discussed all the three methods of fixing the “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” error.

Website maintenance is a painstaking hassle. Nonetheless, it’s crucial to prevent these issues from ever happening. We at WPPals, offer expert WordPress maintenance services that help your website run smoothly without any hiccups. Therefore, if you’re still stuck with the issue mentioned above, just leave us a message, and we’ll get back to you right away!