Your PHP installation appears to be missing the MySQL extension

2 min


0

Your PHP installation appears to be missing the MySQL extension error in WordPress, is a common problem if you are setting up a WordPress CMS on a new Linux VPS. The missing the MySQL extension is a common problem since the extension doesn’t come by default with many operating systems. In this tutorial we will help you to fix the problem with the missing MySQL extension in WordPress, and complete the WordPress installation successfully.

Missing a PHP extension is not something you should be worried about. If you see the following message on your screen when trying to access the WordPress installation via web browser, then you are one of the many WordPress users facing the same problem.

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

Table of Contents

  • 1. Connect via SSH and check the PHP version
  • 2. Create Info.php file
  • 3. Update the required packages
  • 4. Restart the Web Server
  • 5. Update PHP
  • 6. Search all the available packages containing MySQL
  • 7. Restart Apache

1. Connect via SSH and check the PHP version

To fix the problem, you should have a SSH access to the server. Connect to your Linux VPS via SSH and check the PHP version which is currently in use:

php -v

2. Create Info.php file

You can also check the PHP version by creating a simple info.php file in your public_html directory with the following content:

<?php phpinfo(); ?>

Once you create the file, open your favorite web browser and access the file.

3. Update the required packages

If your are running an Ubuntu VPS and PHP 7, then run the following commands:

apt-get update
apt-get install php7.0-mysql

4. Restart the Web Server

Then restart your Apache service for the changes to take effect, or if you are using Nginx + PHP-FPM, then restart the PHP-FPM service.

5. Update PHP

In case you are running PHP 5, run the following commands:

apt-get update
apt-get install php-mysql

Restart the appropriate service for the changes to take effect.

6. Search all the available packages containing MySQL

To search all the available packages containing mysql, you can use this command:

apt-cache search mysql

On the other hand, if you are running a CentOS VPS and you have PHP 7 installed on the server, then run the following commands to fix the problem:

yum update
yum install php70w-mysql

7. Restart Apache

Restart Apache or the PHP-FPM service in case you are using Nginx + PHP-FPM as a web server.

If you have PHP 5 installed on your CentOS server, run the following commands:

yum update
yum install php-mysql

Restart the appropriate service for the changes to take effect.

To search all the available packages containing mysql, you can use the following command:

yum search mysql

Once you install the MySQL extension for PHP, you can return back to your WordPress setup. If the installation went OK, the message about the missing MySQL extension should not be presented to you. You can now continue with your WordPress setup.


PHP installation appears to be missing the MySQL extension

Of course, you don’t have to Fix the Your PHP installation appears to be missing the MySQL extension, if you use one of our MySQL VPS Hosting services, in which case you can simply ask our expert Linux admins to help you Fix the Missing MySQL Extension Error in WordPress or install any other required PHP extension. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on How to Fix the Your PHP installation appears to be missing the MySQL extension,  please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


Like it? Share with your friends!

0
Sande Kennedy

Sande Kennedy is the founder of SandeKennedy.com & Kenyans247.com He is a Kenyan-based Internetprenuer,blogger Political Activist,informer who has an interest in politics, governance, corporate-fraud and human-interest. Kindly drop me a note if you feel aggrieved on any matter that you would want to be highlighted. Twitter @itssandekennedy , Instagram @itssandekennedy WhatsApp: +254791890826 Read More about me here

0 Comments

1
Would you like to get published on this Popular Blog? You can now email Sande Kennedy any breaking news, Exposes, story ideas, human interest articles or interesting videos on: info@sandekennedy.com. Videos and pictures can be sent to +254 791890826 here on WhatsApp by clicking this send button
Powered by