In WordPress, you'll run into the ‘your PHP installation appears to be missing the MySQL extension which is required by WordPress’ error once in a while.

When this error seems, it prevents customers from viewing your web site. If it happens regularly, then it may be unhealthy in your website’s person expertise.

Through the years, we've skilled this error on a number of events on intelfindr and a few of our different model web sites.

From our expertise, we realized that you may repair this error by checking the PHP model and updating WordPress. You can too test the PHP settings and make sure that the MySQL extension is put in.

On this article, we are going to present you the way to repair PHP lacking MySQL extension error in WordPress.

What Is the PHP Missing MySQL Extension Error?

Once you’re engaged on constructing a WordPress web site or visiting an internet web page, chances are you'll come throughout the ‘your PHP installation appears to be missing the MySQL extension which is required by WordPress’ error.

This error normally signifies that one thing went fallacious together with your website’s code and it’s stopping WordPress from connecting to its MySQL database.

The PHP lacking MySQL extension error normally seems whenever you replace or set up WordPress, migrate a web site, change server configurations, or change working techniques that don’t have a MySQL extension (like Linux).

That mentioned, let’s see the causes for this error.

What Causes the PHP Missing MySQL Extension Error?

There are a number of the explanation why a PHP lacking MySQL extension error could happen.

Considered one of them is that you're utilizing an outdated model of WordPress with the most recent PHP model. In case you’re utilizing PHP 7.0 or greater, then you must know that it deprecated the MySQL extension.

So, you probably have an older model of WordPress that’s working with PHP 7.0 or greater, then it gained’t discover the MySQL extension and trigger this error.

Another excuse why you would possibly see this error is that the MySQL extension is both lacking or not correctly configured. Even in case you’re utilizing PHP 5.6 or decrease, the PHP lacking MySQL extension error can nonetheless happen due to an outdated MySQL extension.

Now, let’s see a few of the methods you possibly can repair the ‘your PHP installation appears to be missing the MySQL extension which is required by WordPress’ error.

You should use the hyperlinks beneath to try any of the ideas you’d like:

Fixing the PHP Missing MySQL Extension Error in WordPress

Now that you recognize what causes this WordPress error, listed here are a few of the methods to repair it.

1. Examine 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 normally outcomes in the PHP lacking MySQL extension error.

To begin, you possibly can head to the Instruments » Web site Well being web page from the WordPress dashboard. From right here, merely change to the ‘Info’ tab.

After that, you possibly can scroll down to the ‘Server’ part and click on to broaden it. Right here, you’ll see the server info in your web site.

Go forward and examine the PHP model particulars.

In case your website’s PHP model begins with 7 or decrease, then it means you’ll want to replace it. This will remedy the PHP lacking MySQL extension error as it could be appropriate with the most recent WordPress model.

We extremely suggest utilizing PHP 8.0 or the most recent model as a result of it is going to safeguard your website from safety threats. Plus, it is going to additionally optimize your website’s efficiency and repair any safety vulnerabilities and bugs.

You'll be able to be taught extra by following our information on how to replace your PHP model in WordPress.

2. Replace WordPress to the Newest Model

After checking the PHP model, you may as well see which WordPress model you’re utilizing.

Whether it is an older model and also you’re working the most recent PHP model, then think about updating WordPress to resolve the PHP lacking MySQL extension error.

A easy approach to test the WordPress model is by going to Dashboard » Updates from the WordPress admin panel. Right here, search for the ‘Current version’ info.

If the WordPress model is 3.9 or decrease, then we suggest updating it to repair the lacking MySQL extension error.

The perfect factor is that WordPress comes with a built-in replace supervisor. You'll be able to replace to the most recent model with a click on of a button.

To be taught extra, please see our information on how to safely replace WordPress.

3. Guarantee You Have MySQL Extension Put in

Now that you've up to date the PHP model and WordPress in your web site and are nonetheless going through the ‘PHP missing MySQL extension’ error, you then want to test if the MySQL extension is accurately put in in your website.

You are able to do that by going to the Instruments » Web site Well being web page from the WordPress dashboard. Subsequent, you’ll want to change to the ‘Info’ tab.

After that, head to the ‘Database’ part and click on to broaden it.

Within the Extension discipline, search for mysqli or mysql.

In case you see the sector 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 set up it for you.

4. Examine Your PHP Configuration

One other approach to repair the PHP lacking MySQL extension error is to test your website’s PHP settings.

At instances, you is perhaps importing the fallacious php.ini file or utilizing the fallacious file path. This leads to 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 normally occurs in case you’re utilizing a distinct working system. For instance, you is perhaps importing the php.ini file that’s supposed for Home windows on a Linux server.

To search out the trail of your php.ini file in the phpinfo.php file, you possibly can enter the next internet tackle in the browser:

www.instance.com/phpinfo.php

Simply be certain to substitute www.instance.com together with your area title.

Subsequent, you will notice particulars of your PHP set up.

From right here, you possibly can scroll down and search for the ‘Configuration File Path’ or ‘Loaded Configuration File’ fields.

When you find the php.ini file, merely join to 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 manner, if something goes fallacious, you possibly can restore the php.ini file and entry your web site.

Bonus: Assets for Fixing WordPress Errors

Now that you recognize about PHP lacking MySQL extension error, you may as well try our guides on resolving different WordPress errors:

We hope this text helped you find out how to repair the PHP lacking MySQL extension error in WordPress. You might also need to see our information on how to repair lacking a brief folder error in WordPress and what's 414 request URI too lengthy error and the way to repair it.

In case you favored this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You can too discover us on Twitter and Facebook.




Source link

Share.
Leave A Reply

Exit mobile version