Your PHP installation appears to be missing the MySQL extension which is required by WordPress

July 5, 2015 140.7k views
MySQL One-Click Install Apps Apache PHP Frameworks PHP Linux Basics Ubuntu

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
I just restarted the server and this poped up??
Anyone help how to fix it?

14 comments
8 Answers

The first thing you should do is verify if PHP5's MySQL extension is installed.

Make sure MySQL module for php5 is installed:
dpkg --list | grep php5-mysql

To install php5-mysql module enter:
sudo apt-get install php5-mysql

Next, restart the Apache2 web server:
sudo service apache2 restart

To verify if this worked correctly, create a new PHP file some where on your web server and place this inside of it:

<?php phpinfo(); ?>

Do a CTRL+F search for "mysql"

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
Anyone help me how to fix this problem?

This error is generated in wp-includes/load.php. Go to your Wordpress directory and go look at that file and search for the line that has the error message.

Look at the "if" statement above it to see what MySQL extensions your version of Wordpress is trying to use. If it's checking for "mysqli" and other MySQL extensions, that's a good thing, and you just have to make sure one of those supported extensions is installed.

If it's only checking for the "mysql" extension, the problem is that extension has been deprecated and is no longer installed with new versions of PHP. You have to either upgrade your Wordpress installation, or see if it is possible to install the "mysql" extension with your version of PHP.

Thanks @sierracircle !! It worked. You saved my day :)

Yeah. You are awesome........ :)

I have this problem in Windows 10 please help.

I also have the same problem when trying to install Wordpress after installing LAMP according to this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-14-04
So can anyone help?

by Justin Ellingwood
WordPress is the most popular content management system on the web. In this guide, we'll demonstrate how to install and configure it on an Ubuntu 14.04 server.

HI, This is Subramanyam from qatraininghub ..
The Solution for this "Your PHP installation appears to be missing the MySQL extension which is required by WordPress." Contact a Host Service Provider like Bigrock, Godaddy, Bluehost, Host Gator any more .... Ask Them to Upgrade to Newer Version of PHP . Problem solved ...
if you have your own hst account you can upgrade manually by like this.
1.login to cpanel
2.PHP Version

  1. Upgrade it.. simply - > cPanel >> Select PHP version >> Select and upgrade Thanks for your Question & Answering with me....Subramanyam from qatraininghub We are Started Online training Courses for PHP + MySql with CMS(wordpress,joomla,drupal..) & Live project for more details visit php+mysql course
Have another answer? Share your knowledge.