How to Fix ‘Your PHP Installation Appears to Be Missing the Mysql Extension Required by WordPress’ Error

WordPress is one of the most powerful and easy-to-use CMS for building and managing websites. But still, you may face some errors occasionally. One of them is ‘Your PHP Installation Appears to Be Missing the Mysql Extension Required by WordPress’.

This error may take place due to a nonexistent MySQL extension, an old PHP version, or outdated WordPress software. However, you can easily solve this problem in several ways. 

This article will show you several key causes of why this error takes place and how to solve it effectively.

What Causes the Error – Your PHP Installation Appears to Be Missing the Mysql Extension Required by WordPress

You got a brief idea about the key issues that cause this error in the introductory copy. Now, we’ll talk about these issues detailedly in this section. 

Missing MySQL Extensions

Missing the right MySQL extension is a key cause of why this error may take place. Actually, since the release of PHP 7.0, the traditional MySQL extension is no longer in use. So if you keep using the old MySQL extension, this error may take place.

If you use PHP 7.0 or any updated version, you must use any new extension like MySQli or PDO_MySQL to connect with the database. This can solve the problem.

Outdated WordPress Version

WordPress releases major core updates at least two to three times a year and minor updates anytime they want. Unless you use the latest version of WordPress, you may face the same problem.

Using Outdated PHP Version

Currently, all the PHP versions below 5.6 are considered outdated, even though they have no conflict with the traditional MySQL extension. However, using the older PHP version will limit your ability to use the latest WordPress technologies. This may lead to this problem.

Server Problem

If you have migrated your website to a new hosting server that is missing the right MySQL extension, your website is supposed to get the error again.

How to Fix ‘Your PHP Installation Appears to Be Missing the Mysql Extension Required by WordPress’ Error

There are several steps involved in the process of fixing the error. We’ll show you the steps one by one in the discussion below. 

Step 01: Update the PHP Version and Enable MySQli Extension

If you see this error, You may fail to log into your WordPress dashboard. In this case, you need to take help from your cPanel and whether the latest PHP version is enabled or not.

Log into your cPanel. Locate the Select PHP Version option. Click on it.

Go to Select PHP Version

Come to the Extensions tab. Select a new PHP version from the dropdown list. Hit the Apply button. Scroll down the page after that.

Update the PHP version and find the MySQi extension

Find out the extensions MySQli, nd_mysqli, and nd_pdo_mysql and tick mark them. This will enable all these extensions.

Check necessary extensions

This setting is supposed to get your website or WP dashboard back. If it doesn’t work yet, follow the next step.

Step 02: Enable the PHP Extensions in the php.ini Files Manually

If the above step doesn’t solve your problem, you must manually enable the PHP extension in the php.ini files. Log into your WordPress dashboard and go to the File Manager.

Go to File Manager to enable the PHP Extensions Manually

Locate public_html and open it. Just double-click on it.

Open Public HTML

You need to create a file here named php.ini

To create the file, hit on the button +File. It will open up a pop-up. Type the file name php.ini in the New File Name box. Press the Create New File button at the end. The file will be created.

Create the php.ini file

Now, you need to open the file.

Open the php.ini file in the edit mode

Type the following lines of code on the edit page.

allow_url_fopen = On
display_errors = Off
enable_dl = OFf
file_uploads = On
max_execution_time = 120
max_input_time = 60
max_input_vars = 2000
memory_limit = 256M
post_max_size = 312M
session.ge_maxlifetine = 1440
session.save_path = “/var/cpanel/php/sessions/ea-php74”
upload_max_filesize = 256M
z1ib.output_compression = OFf
extensions=mysqli

Press the Save Changes button at the end. This will enable the extension on your WordPress site.

Type code for manually enabling the php extension

Reload your website. Hope it will start working.

Step 03: Take With Your Hosting Provider

The above two steps are bound to solve the problem. But if the problem isn’t solved, there might be issues with your hosting provider’s server. 

Many times it is seen that hosting providers don’t update their PHP version regularly. And this can also cause this problem. Ask your hosting provider about the problem to check the issue and solve it as soon as possible.

Note: This mostly happens with the less expensive and infamous hosting providers. This is why we always recommend you host your website with highly popular and well-rated servers.

Step 04: Update Your WordPress Version

Once everything is fine, log in to the WordPress dashboard and check if the latest WordPress version is currently enabled. Using an old version may cause this issue to reoccur in the future or cause any other issues.

Navigate to WordPress Dashboard > Updates. You’ll get all the notification updates here. Since we have no notification here, we are using the latest WordPress version.

Update the WordPress version

Hopefully, this way, you can solve the ‘your PHP installation appears to be missing the Mysql extension required by WordPress’ error.

Final Words!

Any problem that halts an established running website is really very annoying to us. It can lead business websites to a huge financial loss as well. 

This is why it’s important to take appropriate measures to prevent the reoccurrence of the problem as well as a proper solution. Ultimate Blocks is trying to cover solutions to every single problem you may face with WordPress.

Stay tuned to our website and let us know what new problem you are facing so we can cover its solution with you. 

Was this helpful?

Thanks for your feedback!

Leave a Reply

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

Introducing New Table Block Plugin - Tableberg

X
Need help?