• Categories
    • Tutorials
    • Beginners Guide
    • WordPress News
    • WordPress Security
    • Best WordPress Plugins
    • WordPress Themes
    • Product Reviews
    • WP Tips & Tricks
  • Guides
    • Start a Blog
    • Make a Website
    • WordPress Hosting
  • WordPress Hosting
    • A2 Hosting
    • HostGator
    • Bluehost
    • Cloudways
  • Managed Hosting
    • WPEngine
    • Rocket.net
    • WPX
    • Kinsta
  • Coupons
    • WPEngine
    • Flywheel
    • Cloudways
    • A2 Hosting
    • WPX Hosting
WordPress Tips & Tricks

‘Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress’: What It Is and How to Fix It

Last Updated on: March 10, 2021 Tom Rankin Leave a Comment

‘Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress’: What It Is and How to Fix It

Fortunately, WordPress errors aren’t a regular occurrence for most users. For those that do crop up regularly, there’s usually a fix to be found. However, if you come across Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress, you may be scratching your head for a while.

This is because there is no obvious repair you can make based on the error. What’s more, everything else may seem fine on your site in some cases. The good news is that solving this problem could take minutes at most.

This post will look at the ‘missing MySQL Extension’ error, discuss why it appears, and more importantly, show you how to fix it.

What the Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress Error Is

As WordPress errors go, Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress is the biggest mouthful of them all. It’s something you’ll notice upon logging into the WordPress dashboard in most cases, and it isn’t something you’ll immediately understand.

Essentially, it means the PHP code that runs WordPress on your server is missing a vital part. Alternatively, the MySQL extension could be present, but your server’s PHP version might not be able to tell from reading the code on your site.

For the uninitiated, your WordPress database contains practically everything on your site. The Content Management System (CMS) shuttles data to and from your database in perpetuity – MySQL is the type of database WordPress runs on.

Why the …MySQL Extension… Error Occurs

Putting everything together, you start to see the real issue. In layman’s terms, the server doesn’t know how to talk to your database, because something is missing, or incompatible. Usually, this happens for two reasons:

  • Your server’s PHP version needs updating. If your server is running PHP 5.6 or lower, this could cause the error to crop up.
  • Your server is running a modern PHP version (7.0+), but you’re running a very old version of WordPress.

In any case, once your server and WordPress align, all will be right with the world.

What You’ll Need to Fix the …MySQL Extension… Error

In order to fix the missing MySQL extension error, you shouldn’t need much more than your site’s login credentials. However, if you have to delve into your site’s file, the following will be essential:

  • You’ll need to find out your site’s current PHP version. With most modern WordPress hosts, this can be found within your account dashboard. However, you may need command line access to your site.
  • Administrator access to your server. If you’re the site owner, your credentials should be somewhere on your hosting account’s dashboard.
  • A Secure File Transfer Protocol (SFTP) client. SFTP is how you’ll access your site’s files, and a free tool such as Cyberduck or FileZilla is perfect. You may also need to sharpen your FTP skills.
  • A code editor, such as Atom. You may need to write a quick file and upload it to your WordPress server. Even your standard text editor will do in a pinch.

Once you have these to hand, you’re ready. However, you might not need them all. Our advice is to grab them if you get to step two below.

Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress: How to Fix the Error (In 3 Steps)

If you don’t fancy working under the hood of your WordPress installation, the error is often fixed before this stage. Here are the three steps you can take to solve the issue:

  • Update WordPress’ core files.
  • Check for the correct PHP version.
  • Install or Update the MySQL extension.

The hope is that the first step will resolve the error. As such, let’s look at this step first.

Step 1. Update Your WordPress Installation

First up is an easy solution that will take about two clicks. Head to the Dashboard > Updates screen within the WordPress back end, and see if there are any core updates to apply:

The WordPress Updates page.

If there are, click the button to install them. Once WordPress has finished, check for the error again. If there’s no error, mop your brow and pour yourself a well-earned drink.

To stop this appearing in the future, remember to apply WordPress updates on a frequent basis, and/or keep up to date with the PHP version on your server.

However, if you still see the error – or if WordPress is up to date – you’ll have work to do under the hood.

Step 2. Check the PHP Version of Your Server

From this point on, you’ll be working within WordPress’ core files. As such, make sure you carry out a clean backup first.

1. Create an info.php File and Log Into Your Server

When you’re ready, crack open your text editor, and enter the following:

<?php phpinfo(); ?>

Save this file as info.php. Next, log into your site using SFTP with the credentials from your account’s dashboard. You should see a list of your site’s files:

The Cyberduck FTP client, showing your WordPress files.

Note that if you run more than one site, there will be multiple folders here. There will be one site within the primary public_html or www folder. Your other sites will often be in a directory with the same name as the site in question.

2. Upload Your info.php File and Check Your Site

Next, upload the info.php file to your server. Often you can just drag and drop the file itself. Then, head to example.com/info.php (replacing the placeholder with your domain). Here, you’ll see a page full of diagnostics:

The PHP diagnostics page.

This contains details on your server’s PHP configuration. However, the part you need is the PHP Version entry in the Core section:

Checking the PHP version of your server.

If the number here begins with a 7, and a WordPress update hasn’t resolved the issue, our advice is to contact your host. There could be something going on that requires expert eyes.

Step 3. Configure (and Possibly Install) the MySQL Extension

If the other resolutions haven’t worked, this likely means you have an old version of PHP. However, you could also be missing the MySQL extension named in the error. Here’s how to resolve it.

1. Check Your info.php File

For this step, head back to your example.com/info.php file. Again, you’ll want to replace the placeholder domain with your own. This time, look for the mysqli or mysql section:

The mysqli section of your PHP diagnostics.

The MySQL extension is installed if you can see a number next to the Client API library version field. If not, you’ll need to contact your host. The solution is often to update your PHP version – this is something your host may need to do on this occasion.

2. Check That You’ve Configured the MySQL Extension Correctly

If your MySQL extension is present, the final step is to check its configuration. Often, your php.ini file will either be for the wrong Operating System (OS), or have the wrong file path.

The quickest way to reconfigure the file is to remove it from your server. Head back to your site’s info.php file, and check the path under the Loaded Configuration File field:

Finding the Loaded Configuration File.

Next, head to the location in your server – you’ll want to use SFTP again. From here, drag the file to your computer to back it up. Finally, delete the file from the server.

Finally, navigate to the front end of your site to check everything is working, then look at the back end for the error. If it’s gone, you can celebrate. If not, we suggest contacting your host, as they will need to diagnose the issue further.

Wrapping Up

Most WordPress errors have the same standard fixes. However, Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress is a tricky one because of the nature of the issue.

This post has looked at three steps to fix the error. Let’s recap:

  1. Update WordPress’ core files.
  2. Check the PHP version on your server.
  3. Make sure you’ve installed the MySQL extension and configured it.

Is this an error you’ve come across before? If so, was there a fix that we haven’t included here? Let us know in the comments section below!

+ Share
Disclosure

Tom Rankin

Tom Rankin is a quality content writer for WordPress, tech, and small businesses. When he's not putting fingers to keyboard, he can be found taking photographs, writing music, playing computer games, and talking in the third-person.

Related Posts

Back to all articles
  • WordPress’ Settings: A New User’s Checklist

    WordPress’ Settings: A New User’s Checklist

  • Introducing The Wp-Config.Php File For WordPress

    The wp-config.php File: Why It’s the Most Important File For WordPress

  • Best Black Friday Deals

    Black Friday and Cyber Monday Deals, Coupons, & Discounts for 2021

Coupons

View more deals
  • Recipe Card Blocks Coupon
    15% OFF

    Recipe Card Blocks Coupon

    Running a cooking or food website can be fun (and tasty) – but
    Get This Deal
  • WP 2FA Coupon
    20% OFF

    WP 2FA Coupon

    Security should be at the forefront of all site owner’s min
    Get This Deal
  • Themskingdom Coupon
    20% OFF

    ThemesKingdom Coupon

    First impressions count. As such, you’ll want a WordPress t
    Get This Deal

Leave a Reply Cancel reply

Full Disclosure This post may contain affiliate links, meaning that if you click on one of the links and purchase an item, we may receive a commission (at no additional cost to you). All opinions are our own and we do not accept payments for positive reviews.

THE BEST OF WPKUBE

Some of the best content we have published so far.

BEGINNER GUIDES & REVIEWS

18 Best Cheap WordPress Hosting Providers in 2023 (From $1.99)
210 Best WordPress Hosting Options for 2023 (Pros & Cons)
38 Best Managed WordPress Hosting Providers for 2023 Compared
45 Best WooCommerce Hosting Providers Compared in 2023 (All Budgets)
5Top 9 Landing Page Plugins for WordPress (2023)
69 Best List Building Plugins for WordPress In 2023
7How to Fix the 500 Internal Server Error on Your WordPress Website
8Thrive Themes Review: A Look At The Full Membership
9Beaver Builder Review: Is it The Best Page Builder Plugin for WordPress (2023)?
10OptimizePress Review: Create Landing Pages with Ease
11How to Make a Website: Complete Beginner’s Guide
12Top 22 Best Free Stock Photo Resources For Your Site
1317 of the Best Google Fonts for 2023 (And How to Use Them in WordPress)
14How to Start a Blog in 2022 (Step by Step Guide)
15How To Fix ‘503 Service Unavailable’ WordPress Error
1611 Best Contact Form Plugins for WordPress in 2023
17How to Add a Custom Logo to Your WordPress Site
18How to Fix Error Establishing a Database Connection in WordPress

WPEngine: 50% OFF Deal

Save 50% on one of the best managed hosting providers.

Get this Deal

Flywheel(our review)

Our Newsletter

Get awesome content delivered straight to your inbox.

Thank you!

You have successfully joined our subscriber list.

.
Featured In Forbes Huffpost Entrepreneur SEJ

About WPKube

WPKube is an online WordPress resource which focuses on WordPress tutorials, How-to’s, guides, plugins, news, and more. We aim to provide the most comprehensive beginner’s guides to anything about WordPress — from installing plugins, themes, automated installs and setups, to creating and setting up pages for your website.

We have over 500+ tutorials, guides, product reviews, tips, and tricks about WordPress. Founded by Devesh Sharma, the main goal of this site is to provide useful information on anything and everything WordPress.

Twitter Facebook

Useful Links

  • Behind the Scenes
  • Beginner Guides
  • WordPress Hosting
  • WooCommerce Themes
  • MeridianThemes
  • Exclusive WordPress Deals
View All Guides »

Reviews

  • WPEngine 33% OFF
  • Thrive Leads
  • Flywheel 33% OFF
  • Divi Theme 20% OFF
  • Thrive Architect
  • Elegant Themes
Reviews »

Deals

  • InMotion Hosting
  • LifterLMS Coupon
  • LiquidWeb Coupon
  • WPEngine Coupon
  • A2 Hosting
  • FloThemes
More Deals »
© Copyright 2023 WPKube ® All Rights Reserved.
  • Contact
  • Site Terms
  • Disclosure
  • Privacy Policy