Lately, a consumer encountered the ‘your PHP set up seems to be lacking the MySQL extension which is required by WordPress’ error and requested us if there was a technique to repair it.
When this error seems, it prevents customers from viewing your web site. If it happens steadily, then it may be unhealthy on your website’s consumer expertise.
On this article, we are going to present you repair PHP lacking MySQL extension error in WordPress.
What Is the PHP Lacking MySQL Extension Error?
If you’re engaged on constructing a WordPress web site or visiting an online web page, you might come throughout the ‘your PHP set up seems to be lacking the MySQL extension which is required by WordPress’ error.
This error often implies that one thing went fallacious along with your website’s code and it’s stopping WordPress from connecting to its MySQL database.
The PHP lacking MySQL extension error often seems whenever you replace or set up WordPress, migrate an internet site, change server configurations, or change working techniques that don’t have a MySQL extension (like Linux).
That stated, let’s see the causes for this error.
What Causes the PHP Lacking MySQL Extension Error?
There are a number of explanation why a PHP lacking MySQL extension error might happen.
One in every of them is that you’re utilizing an outdated model of WordPress with the newest PHP model. In case you’re utilizing PHP 7.0 or larger, then you must know that it deprecated the MySQL extension.
So, when you’ve got an older model of WordPress that’s working with PHP 7.0 or larger, then it gained’t discover the MySQL extension and trigger this error.
Another excuse why you may see this error is that the MySQL extension is both lacking or not correctly configured. Even if you happen to’re utilizing PHP 5.6 or decrease, the PHP lacking MySQL extension error can nonetheless happen resulting from an outdated MySQL extension.
Now, let’s see a few of the methods you’ll be able to repair the ‘your PHP set up seems to be lacking the MySQL extension which is required by WordPress’ error.
You should utilize the hyperlinks beneath to take a look at any of the guidelines you’d like:
Fixing the PHP Lacking MySQL Extension Error in WordPress
Now that you already know what causes this WordPress error, listed below are a few of the methods to repair it.
1. Verify The PHP Model You Are Utilizing
The very first thing you are able to do is test the PHP model of your web site. A battle between WordPress and PHP model often ends in the PHP lacking MySQL extension error.
To start out, you’ll be able to head to the Instruments » Website Well being web page from the WordPress dashboard. From right here, merely change to the ‘Information’ tab.
After that, you’ll be able to scroll all the way down to the ‘Server’ part and click on to broaden it. Right here, you’ll see the server info on your web site.
Go forward and think about the PHP model within the particulars.
In case your website’s PHP model begins with 7 or decrease, then it means you’ll must replace it. This could resolve the PHP lacking MySQL extension error as it could be suitable with the newest WordPress model.
We extremely suggest utilizing PHP 8.0 or the newest model as a result of it would safeguard your website from safety threats. Plus, it would additionally optimize your website’s efficiency and repair any safety vulnerabilities and bugs.
You’ll be able to study extra by following our information on replace your PHP model in WordPress.
2. Replace WordPress to the Newest Model
After checking the PHP model, it’s also possible to see which WordPress model you’re utilizing.
Whether it is an older model and also you’re operating the newest PHP model, then take into account updating WordPress to resolve the PHP lacking MySQL extension error.
A easy technique to test the WordPress model is by going to Dashboard » Updates from the WordPress admin panel. Right here, search for the ‘Present model’ info.
If the WordPress model is 3.9 or decrease, then we suggest updating it to repair the lacking MySQL extension error.
One of the best factor is that WordPress comes with a built-in replace supervisor. You’ll be able to replace to the newest model with a click on of a button.
To study extra, please see our information on safely replace WordPress.
3. Guarantee You Have MySQL Extension Put in
Now that you’ve got up to date the PHP model and WordPress in your web site and are nonetheless dealing with the ‘PHP lacking MySQL extension’ error, then it is advisable test if the MySQL extension is accurately put in in your website.
You are able to do that by going to the Instruments » Website Well being web page from the WordPress dashboard. Subsequent, you’ll want to modify to the ‘Information’ tab.
After that, head to the ‘Database’ part and click on to broaden it.
Within the Extension area, search for mysqli or mysql.
In case you see the sphere clean or not seen in any respect, then it means you’re lacking the MySQL extension.
Now, the set up course of for the extension will rely in your WordPress internet hosting supplier. You’ll be able to merely attain out to them for assist or ask the assist staff to put in it for you.
4. Verify Your PHP Configuration
One other technique to repair the PHP lacking MySQL extension error is to test your website’s PHP settings.
At occasions, you could be importing the fallacious php.ini file or utilizing the fallacious file path. This results in PHP configuration points and lacking MySQL extension errors.
The php.ini file is a default configuration file for PHP and impacts how your website capabilities. Importing the wrong file often occurs if you happen to’re utilizing a unique working system. For instance, you could be importing the php.ini file that’s meant for Home windows on a Linux server.
To search out the trail of your php.ini file within the phpinfo.php file, you’ll be able to enter the next internet tackle within the browser:
Simply be certain that to interchange www.instance.com along with your area identify.
Subsequent, you will notice particulars of your PHP set up.
From right here, you’ll be able to scroll down and search for the ‘Configuration File Path’ or ‘Loaded Configuration File’ fields.
When you find the php.ini file, merely hook up with an FTP consumer, go to the file path, and delete it to see if it fixes the PHP lacking MySQL extension error.
Earlier than deleting, we suggest making a backup of the present file by downloading it onto your laptop. This fashion, if something goes fallacious, you’ll be able to restore the php.ini file and entry your web site.
Bonus Assets for Fixing WordPress Errors
Now that you already know about PHP lacking MySQL extension error, it’s also possible to try our guides on resolving different WordPress errors:
Find out how to Repair The Essential Error in WordPress (Step by Step)
Find out how to Repair the five hundred Inner Server Error in WordPress
Find out how to Repair DNS Server Not Responding Error in WordPress (5 Methods)
Find out how to Simply Allow WordPress Debug Mode to Repair Website Errors
Find out how to Repair Publish-Processing of Picture Failed Error in WordPress
We hope this text helped you learn to repair the PHP lacking MySQL extension error in WordPress. You may additionally wish to see our tricks to pace up WordPress efficiency or our full WordPress troubleshooting information.
In case you preferred this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You can even discover us on Twitter and Fb.
The put up Find out how to Repair “PHP Lacking MySQL Extension” Error in WordPress first appeared on WPBeginner.
Subscribe to MarketingSolution.
Receive web development discounts & web design tutorials.
Now! Lets GROW Together!