Web-Design
Thursday December 31, 2020 By David Quintanilla
WordPress Troubleshooting: PHP Installation is Missing the MySQL Extension


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

In case you’re putting in WordPress otherwise you’ve moved your web site to a unique server, you might 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, for those who don’t know the reason for this error. Right now, we’ll attempt to undergo the doable options that would repair this error.

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

As you’ll be able to see, WordPress is attempting 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 together with your PHP, it gained’t be capable to work together with your MySQL database. And thus, it complains as a way to take the required actions to repair it.

On this submit, we’ll talk about the doable options you would use to repair this problem.

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 would do it.

First create an information.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/information.php URL in your browser and it ought to show the PHP configuration info as proven within the following screenshot.

Phpinfo

Now, attempt to discover the mysql or mysqli extension part. If one among these are put in and configured in your PHP set up, you must be capable 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 wish to mess with server admin, you would ask your internet hosting supplier and they need to be capable to do it for you fairly rapidly.

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

Then again, for those who discover that the required extensions are put in and configured correctly, and nonetheless you’re getting this error, you would undergo the following 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 newest model in your server. For instance, when you’ve got moved your web site 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 might advocate you to improve your web site to the newest model. Whenever you improve your WordPress, it replaces outdated recordsdata with new recordsdata and that will repair this error. You possibly can learn how to upgrade your WordPress version in this article.

In fact, even when you haven’t any errors, it’s really useful to improve your WordPress periodically to the newest steady model. This may assist shield you in opposition to any safety vulnerabilities that will exist within the older WordPress model.

Conclusion

Right now, we mentioned a pair doable options to the “lacking the MySQL extension” error in WordPress. Let me know within the feedback under when you’ve got every other questions! And take a look at a few of our different posts for extra WordPress suggestions and tips.



Source link