How to Fix PHP Installation Error

Have you encountered the “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” error while trying to install WordPress or visit your WordPress site? Though WordPress is the best web host available, you can still encounter errors from time to time. Like other WordPress error messages, we know it’s frustrating to receive a message that prevents you from using or seeing your WordPress site. However, there is no need to panic! This error typically happens when something is wrong with the code on your website and something is preventing WordPress from connecting with its MySQL database. In this article, we will discuss more about this error and how to fix it. It is a bit more complicated than fixing a 404 error in WordPress and might require some expert help.

How to Fix "Your PHP Installation Appears to Be Missing the MySQL Extension Which is Required by WordPress" Error

The “WordPress Missing MySQL Extension” Error

The “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” error occurs because of an issue with the code or scripts on your server. To be more specific, it means that the PHP on your server doesn’t have the necessary extension to connect your WordPress site to its MySQL database.

Causes of the “Your PHP Installation Appears to be Missing the MySQL Extension” Error

There are two main causes of this error:

You’re Using an Outdated Version of WordPress

If you are using an extremely old version of WordPress with a modern version of PHP, you might receive this error. That’s because PHP 7.0 deprecated the MySQL extension in favor of MySQLi. This means PHP 7+ no longer includes the MySQL extension that WordPress needs. Newer versions of WordPress use the newer PDO_MySQL or MySQLi extensions. This is why older versions of WordPress, aka below version 3.9, might induce this error.

You’re Using PHP 5.6 or Lower, but the Extension is Missing or Configured Incorrectly

The other reason you might encounter this error is because you are using PHP 5.6, which is before the MySQL extension was deprecated, but the extension is missing or configured incorrectly.

The “WordPress Missing MySQL Extension” Error

How to Fix the “Your PHP Installation Appears to be Missing the MySQL Extension Which is Required by WordPress” Error

Now that you know what this error means and what might have caused it, let’s discuss some steps you can take to fix the problem.

1. Check Which Version of PHP You Are Using

The first way to fix this issue is to check which version of PHP your WordPress site’s server is running on. This will help you figure out the next step to take. To check, first connect to your WordPress site’s server using FTP. If you don’t know your FTP credentials, you can get them from your web host. You will need an FTP client to connect. If your host is using cPanel, you can use the cPanel File Manager tool.

Once you are connected to the server, next create a new file called phpinfo.php in the root directory of your WordPress website. (This should be the same folder that contains your wp-config.php file.)

Next, edit the file and add the following code snippet:

<php

phpinfo();

?>

Then, save the file (and re-upload the saved version if necessary) and navigate to yoursite.com/phpinfo.php, and make sure to swap out yoursite.com with your actual domain name. You will see a screen that shows you a lot of data about the PHP configuration on your server. Scroll down to the “Core” section, and find the “PHP Version” item. Check the numbers: they will be in format x.x.x. If your PHP starts with a 7, you most likely need to update the WordPress software. If not, you might be missing the MySQL extension. It is highly recommended that you use the latest version of PHP on your website.

2. Update the Core WordPress Software

If your server is using PHP 7+, the cause is probably that you are running an old version of WordPress. This error can be triggered if you are using Version 3.9 of WordPress or lower. In this case, you will need to update your WordPress software. The good news is, when you update your WordPress software, you will get lots of other features, security, and performance benefits. The latest version of WordPress in 2021 is WordPress 5.7.

How to Manually Upgrade WordPress Software

To manually upgrade the version of WordPress you have, first make sure that your website is backed up. Then, go to WordPress.org and simply download the latest version of the software. Once you’ve downloaded it, extract the zip file to your computer. Next, open the file that contains all of the WordPress files and delete these items:

  • The wp-config-sample.php file
  • The wp-config.php file (if this file is there, which it might not be)
  • And the wp-content folder

After you delete these, upload the remaining files and folders to your server via FTP. When you are prompted about duplicate files by your FTP client, tell it to overwrite all files. Once the file uploads are complete, your WordPress site will be running on the most recent version, and the error should be resolved! Don’t forget to also update all of your WordPress themes and WordPress plugins to the latest versions, too.

wordpress errors

3. Check to See if the MySQL Extension is Installed

Your site might be missing the MySQL extension that WordPress requires if your server is still using PHP 5.6 or lower. To check if you are missing this extension, go back to the phpinfo.php file that you uploaded to your server in the first step of this article. Check for a section named either “mysql” or “mysqli.” If the MySQL extension is installed, you will see a version number next to the “Client API library version” item.

If you can’t find this data, the MySQL extension is not installed. In this case, we recommend that you contact your host’s support staff and request that they install it for you.

4. Ensure Your PHP Extension is Configured Correctly

If you are using PHP 5.6 or lower and the extension is installed, the problem may be that it is not configured correctly. There are some common problems with the PHP extension:

  • Uploading a php.ini file that is meant for Windows servers when you are using a Linux server
  • Incorrect file paths

To find the location of your php.ini file, go to the phpinfo.php file that you created earlier. First, make sure to back up the existing file by downloading it to your local computer. Then, try deleting the php.ini file, and that might resolve the issue.

your php installation appears to be missing the mysql extension

Fix WordPress Errors with SEO Design Chicago

Hopefully, these steps have helped you resolve the “your PHP installation appears to be missing the MySQL extension which is required by WordPress” error. If you are still experiencing errors and issues with your WordPress website, contact the experts at SEO Design Chicago! Our web developers can help you fix any common WordPress errors and problems that you are having with your WordPress website.

FAQs:

  • What does the “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” error mean?
  • How do I check if the MySQL extension is installed?
  • What causes the “WordPress Missing MySQL extension” error?
  • How do I fix the “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” error?
  • How do I upgrade my WordPress software?

Contact Us Today!


Call Now ButtonCall Now