Question

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

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?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

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?