Your PHP installation appears to be missing the MySQL extension
May 13, 2018 3:06 PM Subscribe
"Your PHP installation appears to be missing the MySQL extension which is required by WordPress." I updated an old WordPress site today, and broke it. To fix it, I re-installed my backup of the website which is several years old (the site hasn't changed), and now I get the above error message instead of my site.
From the googling I've done, I believe this is because my host has updated their PHP, and now my old version of WordPress is looking for a version of PHP that doesn't exist. I contacted the host, and they can't change the version of PHP, and I'm unable to find where in my old WordPress back-up i can change a file to make wordpress happy with the modern version of PHP that is running. Any suggestions?
I don't know the version of WordPress I had backed up (or the version of PHP it expected to find) - The backup was made in 2013....)
I can get into the site via FTP.
Also, the site had been updated sometime in 2017, so at some point in the near past the site was playing well with the hosts' version of PHP, which now only runs PHP7 or above
From the googling I've done, I believe this is because my host has updated their PHP, and now my old version of WordPress is looking for a version of PHP that doesn't exist. I contacted the host, and they can't change the version of PHP, and I'm unable to find where in my old WordPress back-up i can change a file to make wordpress happy with the modern version of PHP that is running. Any suggestions?
I don't know the version of WordPress I had backed up (or the version of PHP it expected to find) - The backup was made in 2013....)
I can get into the site via FTP.
Also, the site had been updated sometime in 2017, so at some point in the near past the site was playing well with the hosts' version of PHP, which now only runs PHP7 or above
Do you have a stale "php.ini" file on your server that might be configured for the old php and now is telling php 7 the wrong things? Try renaming/deleting it so that you're using the default php configuration
I can think of some other ways to solve this but they would require shell access and the ability to install programs on the server.
posted by dis_integration at 5:45 PM on May 13, 2018 [1 favorite]
I can think of some other ways to solve this but they would require shell access and the ability to install programs on the server.
posted by dis_integration at 5:45 PM on May 13, 2018 [1 favorite]
Best answer: A backup from 2013 is going to be using an old Wordpress core that references long-obsolete MySQL functions.
You need to do a manual upgrade of your backup to the latest Wordpress core. Follow the exact instructions.
posted by holgate at 7:10 PM on May 13, 2018 [1 favorite]
You need to do a manual upgrade of your backup to the latest Wordpress core. Follow the exact instructions.
posted by holgate at 7:10 PM on May 13, 2018 [1 favorite]
Best answer: What version of WordPress was it? I suspect incremental updates to each major version might do it. All the old versions are available.
posted by artlung at 7:50 PM on May 13, 2018
posted by artlung at 7:50 PM on May 13, 2018
Response by poster: Thank you folks...will be trying holgate and artlung's suggestions and report back...In my initial troubleshooting I had looked for a stale php.ini file on my server and couldn't find one, and I did have my FTP set to show hidden files...
Also, I tried humboldt32's suggestion, removing the spaces and adding the current php version, didn't seem to do the trick....
posted by extrabox at 10:17 PM on May 13, 2018
Also, I tried humboldt32's suggestion, removing the spaces and adding the current php version, didn't seem to do the trick....
posted by extrabox at 10:17 PM on May 13, 2018
No, you want to specify the php version that your WP build is compatible with, not the current version of PHP.
posted by humboldt32 at 1:07 AM on May 14, 2018
posted by humboldt32 at 1:07 AM on May 14, 2018
The latest version of WordPress (4.9.5) is still supposed to work with PHP 5.2.4+ according to the requirements page, although PHP 7.2 is recommended.
To find the WordPress version of your backup (or just in general), open up this file in a text editor:
/wp-includes/version.php
and look for the line near the top:
$wp_version =
The same file will contain the minimum versions of PHP and MySQL required by the installation of WordPress that's on the server now.
Seconding doing manual updates incrementally, to see if that does the trick. Once you have the version numbers of everything, you can download the older WordPress installs from the link artlung provided. From the extended instructions, specifically from the section "Upgrading Across Multiple Versions":
To find the WordPress version of your backup (or just in general), open up this file in a text editor:
/wp-includes/version.php
and look for the line near the top:
$wp_version =
The same file will contain the minimum versions of PHP and MySQL required by the installation of WordPress that's on the server now.
Seconding doing manual updates incrementally, to see if that does the trick. Once you have the version numbers of everything, you can download the older WordPress installs from the link artlung provided. From the extended instructions, specifically from the section "Upgrading Across Multiple Versions":
"If you plan on upgrading across more than two major releases, you should consider upgrading incrementally to avoid potential conflicts and minimize the risks of database damage. For example, if you plan on upgrading from 2.5 to 4.9.5, upgrade to 2.7 first, followed by 2.9, then 3.1, and so on. Essentially, it's okay to skip one release, but never skip TWO when upgrading."posted by rangefinder 1.4 at 1:36 AM on May 14, 2018 [1 favorite]
Response by poster: Right humbolt32, I followed your instructions but made a mistake in describing what I did, I did try older versions of PHP.
posted by extrabox at 11:28 AM on May 14, 2018
posted by extrabox at 11:28 AM on May 14, 2018
Response by poster: Thanks Rangefinder 1.4, this helps - my old backup is wp 3.5.2 requiring php 5.2.4 - Now to try manual uupgrades!
posted by extrabox at 11:33 AM on May 14, 2018
posted by extrabox at 11:33 AM on May 14, 2018
Response by poster: Incremental manual FTP updates restored the site! (v.3.9 and it came back to life!) Thanks holgate and artlung.
posted by extrabox at 12:21 PM on May 14, 2018
posted by extrabox at 12:21 PM on May 14, 2018
The latest version of WordPress (4.9.5) is still supposed to work with PHP 5.2.4+ according to the requirements page, although PHP 7.2 is recommended.
It does, but only if that old PHP install has the newer mysqli extension. (Good call on the incremental updates.)
posted by holgate at 1:52 PM on May 14, 2018
It does, but only if that old PHP install has the newer mysqli extension. (Good call on the incremental updates.)
posted by holgate at 1:52 PM on May 14, 2018
This thread is closed to new comments.
< FilesMatch \.php$>
SetHandler php56-cgi
< /FilesMatch>
Changing "56" to whatever version of PHP your old instance of WP is compatible with.
(Remove the spaces I had to add for the comment to post)
posted by humboldt32 at 5:08 PM on May 13, 2018