‘Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress’: What It Is and How to Fix It – Netadroit WebDesign
Fortunately, WordPress errors aren’t an everyday prevalence for many customers. For people who do crop up frequently, there’s normally a repair to be discovered. However, should 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 some time.
This is as a result of there isn’t any apparent restore you can also make primarily based on the error. What’s extra, every part else could appear fantastic in your website in some circumstances. The excellent news is that fixing this drawback may take minutes at most.
This put up will have a look at the ‘missing MySQL Extension’ error, focus on why it seems, and extra importantly, present you the way to 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 normally, and it isn’t one thing you’ll instantly perceive.
Essentially, it means the PHP code that runs WordPress in your server is lacking a significant half. Alternatively, the MySQL extension may very well be current, however your server’s PHP model may not have the option to inform from studying the code in your website.
For the uninitiated, your WordPress database accommodates virtually every part in your website. The Content Management System (CMS) shuttles knowledge 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 part collectively, you begin to see the actual difficulty. In layman’s phrases, the server doesn’t know the way to speak 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 working PHP 5.6 or decrease, this might trigger the error to crop up.
- Your server is working a contemporary PHP model (7.0+), however you’re working a really outdated model of WordPress.
In any case, as soon as your server and WordPress align, all will probably 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 far more than your website’s login credentials. However, if in case you have to delve into your website’s file, the following will probably be important:
- You’ll want to discover out your website’s present PHP model. With most fashionable WordPress hosts, this may be discovered inside your account dashboard. However, chances are you’ll want command line entry to your website.
- Administrator entry to your server. If you’re the website proprietor, your credentials ought to be someplace in your internet hosting account’s dashboard.
- A Secure File Transfer Protocol (SFTP) consumer. SFTP is the way you’ll entry your website’s information, and a free tool equivalent to Cyberduck or FileZilla is ideal. You can also want to sharpen your FTP abilities.
- A code editor, equivalent to Atom. You might have to write a fast file and add it to your WordPress server. Even your normal textual content editor will do in a pinch.
Once you might have these to hand, you’re prepared. However, you may not want all of them. Our recommendation is to seize them should 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 below the hood of your WordPress set up, the error is commonly mounted earlier than this stage. Here are the three steps you possibly can take to clear up the difficulty:
The hope is that the first step will resolve the error. As such, let’s have a look at this step first.
Step 1. Update Your WordPress Installation
First up is a straightforward answer that can take about two clicks. Head to the Dashboard > Updates display screen inside the WordPress again finish, and see if there are any core updates to apply:
If there are, click on the button to set up them. Once WordPress has completed, verify for the error once more. If there’s no error, mop your forehead and pour your self a properly-earned drink.
To cease this showing in the future, keep in mind to apply WordPress updates on a frequent foundation, and/or sustain to date with the PHP model in your server.
However, should you nonetheless see the error – or if WordPress is up to date – you’ll have work to do below the hood.
Step 2. Check the PHP Version of Your Server
From this level on, you’ll be working inside WordPress’ core information. As such, ensure you perform a clear backup first.
1. Create an data.php File and Log Into Your Server
When you’re prepared, crack open your textual content editor, and enter the following:
<?php phpinfo(); ?>
Save this file as data.php. Next, log into your website utilizing SFTP with the credentials out of your account’s dashboard. You ought to see a listing of your website’s information:
Note that should you run multiple website, there will probably be a number of folders right here. There will probably be one website inside the major public_html or www folder. Your different websites will typically be in a listing with the similar identify as the website in query.
2. Upload Your data.php File and Check Your Site
Next, add the data.php file to your server. Often you possibly can simply drag and drop the file itself. Then, head to instance.com/data.php (changing the placeholder along with your area). Here, you’ll see a web page filled with diagnostics:
This accommodates particulars in 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 may very well be one thing happening that requires professional eyes.
Step 3. Configure (and Possibly Install) the MySQL Extension
If the different resolutions haven’t labored, this doubtless means you might have an outdated model of PHP. However, you may be lacking the MySQL extension named in the error. Here’s how to resolve it.
1. Check Your data.php File
For this step, head again to your instance.com/data.php file. Again, you’ll need to exchange the placeholder area with your individual. This time, search for the mysqli or mysql part:
The MySQL extension is put in should you can see a quantity subsequent to the Client API library model area. If not, you’ll want to contact your host. The answer is commonly to replace your PHP model – that is one thing your host might 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 incorrect Operating System (OS), or have the incorrect file path.
The quickest means to reconfigure the file is to take away it out of your server. Head again to your website’s data.php file, and verify the path below the Loaded Configuration File area:
Next, head to the location in your server – you’ll need 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 website to verify every part is working, then have a look at the again finish for the error. If it’s gone, you possibly can rejoice. If not, we propose contacting your host, as they’ll want to diagnose the difficulty additional.
Most WordPress errors have the similar normal fixes. However, Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress is a tough one due to the nature of the difficulty.
This put up has checked out three steps to repair the error. Let’s recap:
- Update WordPress’ core information.
- Check the PHP model in your server.
- Make positive 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 feedback part beneath!