Thursday December 31, 2020 By Dave
WordPress Troubleshooting: PHP Installation is Missing the MySQL Extension

On this fast article, we’ll talk about troubleshoot the “lacking the MySQL extension” error when you’re putting in WordPress.

In case you’re putting in WordPress otherwise you’ve moved your web site to a unique server, it’s possible you’ll encounter the next error:

Your PHP set up seems to be lacking the MySQL extension which is required by WordPress.

This may be irritating for you as a WordPress admin, should you don’t know the reason for this error. Right this moment, we’ll attempt to undergo the potential options that might repair this error.

Earlier than we go forward and talk about the potential options, let’s rapidly fetch the code which shows this error.

As you possibly can see, WordPress is making an attempt to load a few extensions which might be associated to MySQL. Particularly, it’s checking for the supply of the mysql, mysqli and mysqlnd PHP extensions. If WordPress finds that none of those extensions are put in and configured along with your PHP, it gained’t have the ability to work along with your MySQL database. And thus, it complains with the intention to take the required actions to repair it.

On this publish, we’ll talk about the potential options you possibly can use to repair this difficulty.

Confirm the MySQL Extension Set up

The basis explanation for this error is the unavailability of the PHP extensions which might be required for database operations. So the very first thing is to verify if one of many MySQL extensions are put in and enabled in your server. There are a a few methods you possibly can do it.

First create an data.php file with the next contents.

Add this file to the doc root of your WordPress web site. Subsequent, open the https://your-wordpress-website/data.php URL in your browser and it ought to show the PHP configuration data as proven within the following screenshot.


Now, attempt to discover the mysql or mysqli extension part. If one in all these are put in and configured in your PHP set up, it is best to have the ability to discover them as proven within the following screenshot.

Mysqli Section

In case you don’t discover it, it signifies that it’s not put in in your server. On this case, you simply want to put in the mysql or mysqli extension, and also you’re good to go.

If you wish to set up it your self, check out my article explaining how to install specific PHP extensions on your server. You’ll must have root entry to your server shell so as to have the ability to set up it your self. In case you don’t have entry otherwise you don’t need to mess with server admin, you possibly can ask your internet hosting supplier and they need to have the ability to do it for you fairly rapidly.

Usually, that is the foundation explanation for this error. After putting in the required extension, your WordPress website ought to begin working.

Then again, should you discover that the required extensions are put in and configured correctly, and nonetheless you’re getting this error, you possibly can undergo the subsequent part to see if that works for you.

Confirm the WordPress Model

It could possibly be that you simply’re working an outdated WordPress model, however that PHP and associated extensions are upgraded to the most recent model in your server. For instance, when you have moved your website to a brand new internet hosting supplier, this might trigger a model incompatibility between your WordPress and PHP variations.

In case you discover that you simply’re working outdated WordPress model, I’d suggest you to improve your website to the most recent model. Whenever you improve your WordPress, it replaces outdated recordsdata with new recordsdata and which will repair this error. You possibly can learn how to upgrade your WordPress version in this article.

After all, even when you haven’t any errors, it’s really helpful to improve your WordPress periodically to the most recent steady model. This may assist shield you towards any safety vulnerabilities which will exist within the older WordPress model.


Right this moment, we mentioned a pair potential options to the “lacking the MySQL extension” error in WordPress. Let me know within the feedback beneath when you have some other questions! And take a look at a few of our different posts for extra WordPress ideas and methods.

Source link

Leave a Reply

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