Fortunately, WordPress errors aren’t a common incidence for many users. For people who do crop up repeatedly, there’s normally a repair to be discovered. However, when you come throughout Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress, chances are you'll be scratching your head for a whereas.
This is as a result of there is no apparent restore you may make based mostly on the error. What’s extra, every little thing else could seem nice on your site in some instances. The excellent news is that fixing this downside may take minutes at most.
This publish will take a look at the ‘missing MySQL Extension’ error, focus on why it seems, and extra importantly, present you repair 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 largest mouthful of all of them. It’s one thing you’ll discover upon logging into the WordPress dashboard in most instances, and it isn’t one thing you’ll instantly perceive.
Essentially, it means the PHP code that runs WordPress on your server is lacking a very important half. Alternatively, the MySQL extension could possibly be current, however your server’s PHP model may not have the ability to inform from reading the code on your site.
For the uninitiated, your WordPress database incorporates virtually every little thing on your site. The Content Management System (CMS) shuttles information to and out of your database in perpetuity – MySQL is the kind of database WordPress runs on.
Why the …MySQL Extension… Error Occurs
Putting every little thing collectively, you start to see the true situation. In layman’s phrases, the server doesn’t know discuss to your database, as a result of one thing is lacking, or incompatible. Usually, this occurs for 2 causes:
- Your server’s PHP model wants updating. If your server is operating PHP 5.6 or decrease, this might trigger the error to crop up.
- Your server is operating a trendy PHP model (7.0+), however you’re operating a very previous model of WordPress.
In any case, as soon as your server and WordPress align, all will be proper with the world.
What You’ll Need to Fix the …MySQL Extension… Error
In order to repair the lacking MySQL extension error, you shouldn’t want rather more than your site’s login credentials. However, if you must delve into your site’s file, the next will be important:
- You’ll want to search out out your site’s present PHP model. With most trendy WordPress hosts, this may be discovered inside your account dashboard. However, chances are you'll want command line entry to your site.
- Administrator entry to your server. If you’re the site proprietor, your credentials must be someplace on your hosting account’s dashboard.
- A Secure File Transfer Protocol (SFTP) shopper. SFTP is the way you’ll entry your site’s recordsdata, and a free instrument akin to Cyberduck or FileZilla is good. You may have to (*7*).
- A code editor, akin to Atom. You might have to write down a fast file and add it to your WordPress server. Even your customary textual content editor will do in a pinch.
Once you've these at hand, you’re prepared. However, you may not want all of them. Our recommendation is to seize them when you get to step two beneath.
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 beneath the hood of your WordPress set up, the error is typically mounted earlier than this stage. Here are the three steps you may take to resolve the difficulty:
The hope is that step one will resolve the error. As such, let’s take a look at this step first.
Step 1. Update Your WordPress Installation
First up is an simple answer that will take about two clicks. Head to the Dashboard > Updates display throughout the WordPress again finish, and see if there are any core updates to use:
If there are, click on the button to put in them. Once WordPress has completed, verify for the error once more. If there’s no error, mop your forehead and pour your self a well-earned drink.
To cease this showing in the longer term, bear in mind to use WordPress updates on a frequent foundation, and/or hold updated with the PHP model on your server.
However, when you nonetheless see the error – or if WordPress is updated – you’ll have work to do beneath the hood.
Step 2. Check the PHP Version of Your Server
From this level on, you’ll be working inside WordPress’ core recordsdata. As such, ensure you perform a clear backup first.
1. Create an information.php File and Log Into Your Server
When you’re prepared, crack open your textual content editor, and enter the next:
<?php phpinfo(); ?>
Save this file as information.php. Next, log into your site utilizing SFTP with the credentials out of your account’s dashboard. You ought to see a listing of your site’s recordsdata:
Note that when you run a couple of site, there will be a number of folders right here. There will be one site throughout the main public_html or www folder. Your different websites will typically be in a listing with the identical title because the site in query.
2. Upload Your information.php File and Check Your Site
Next, add the information.php file to your server. Often you may simply drag and drop the file itself. Then, head to instance.com/information.php (changing the placeholder together with your area). Here, you’ll see a page full of diagnostics:
This incorporates particulars on your server’s PHP configuration. However, the half you want is the PHP Version entry in the Core part:
If the quantity right here begins with a 7, and a WordPress replace hasn’t resolved the difficulty, our recommendation is to contact your host. There could possibly be one thing going on that requires expert eyes.
Step 3. Configure (and Possibly Install) the MySQL Extension
If the opposite resolutions haven’t labored, this probably means you've an previous model of PHP. However, you may be lacking the MySQL extension named in the error. Here’s resolve it.
1. Check Your information.php File
For this step, head again to your instance.com/information.php file. Again, you’ll wish to exchange the placeholder area with your individual. This time, search for the mysqli or mysql part:
The MySQL extension is put in when you can see a quantity subsequent to the Client API library model subject. If not, you’ll have to contact your host. The answer is typically to replace your PHP model – this is one thing your host could have to do on this event.
2. Check That You’ve Configured the MySQL Extension Correctly
If your MySQL extension is current, the ultimate step is to verify its configuration. Often, your php.ini file will both be for the flawed Operating System (OS), or have the flawed file path.
The quickest approach to reconfigure the file is to take away it out of your server. Head again to your site’s information.php file, and verify the trail beneath the Loaded Configuration File subject:
Next, head to the situation in your server – you’ll wish to use SFTP once more. From right here, drag the file to your laptop to again it up. Finally, delete the file from the server.
Finally, navigate to the entrance finish of your site to verify every little thing is working, then take a look at the again finish for the error. If it’s gone, you may have a good time. If not, we recommend contacting your host, as they will have to diagnose the difficulty additional.
Most WordPress errors have the identical customary fixes. However, Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress is a tough one as a result of of the character of the difficulty.
This publish has checked out three steps to repair the error. Let’s recap:
- Update WordPress’ core recordsdata.
- Check the PHP model on your server.
- Make certain you’ve put in the MySQL extension and configured it.
Is this an error you’ve come throughout earlier than? If so, was there a repair that we haven’t included right here? Let us know in the comments part beneath!