PHP:

PHP is an open source scripting language executed on the server and it is an important tool for making interactive and dynamic pages. It is widely used to develop the web based software applications and functionalities. It is mainly designed for web development. PHP code is embedded in HTML codes or other web frameworks. PHP codes are executed on the server. It runs in many platforms like Windows, Mac OS X, Linux, Ubuntu, etc. It is compatible with all the servers and supports wide variety of database.

MYSQL:

MYSQL is open source relational database management system (RDBMS). It is a leading database with high performance and reliability and it is used for both small and large database. It is developed and distributed by Oracle Corporation. All the data in MYSQL are stored in table format. For cross-platform MYSQL is combined with PHP. The program can be developed in Windows and served on Unix Platform. PHP can be connected with MYSQL using MySQLi extension and PDO (PHP Data Objects).

Error "Your PHP installation appears to be missing the MySQL extension":

It is an error in WordPress. If the WordPress is installed on Linux VPS for the first time some problems may occur and error like missing MYSQL extension will be displayed.

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

The above error will be seen in the screen, when you install WordPress through web browser.
  • SSH Connection and check the version of PHP:
To rectify the problem, the SSH should be accessed to the server. Connect to your Linux VPS via SSH and currently used PHP version has to be checked through the command given below:

Code:
php -v
  • Creating Info.php file:
Php version can also be checked by creating Info.php file in the public_html directory. The following command is used to do that,

Code:
<?php phpinfo(); ?>
Once a file is created, we can assess the file by opening it.
  • Update the required Package:
If you are running an Ubuntu server, run the below commands as per the PHP version,

PHP 5:

Code:
apt-get update
apt-get install php5-mysqlnd
PHP 7:

Code:
apt-get update
apt-get install php7.0-mysql
  • Restart the Web Server:
The Apache services has to be restarted to make the changes.
  • Update PHP:
Following commands are used to update PHP 5.

Code:
apt-get update
apt-get install php-mysql
Restart the particular service for updating.
  • Search all the available packages that contain MySQL:
Use the below command to search all the available packages that contains mysql,

Code:
apt-cache search mysql
  • Restart Apache:
If you are using Nginx + PHP-FPM as a web browser, restart Apache

Code:
yum update
yum install php-mysql
The above commands are used in PHP 5.Restart the particular service for making changes. For searching all the packages containing mysql, use the following command,

Code:
yum search mysql
After installing the MySQL extension for PHP, you can come back to WordPress setup. If the installation is sucessful, the error message will not be received.

Steps to follow if you are a user and don’t have access of SSH:
  • First check your version which you are using in cpanel currently and change the PHP version in cpanel. Also check that you have select the mysql in “Switch To PHP Extensions”.
You can check it through:

Code:
Login to cpanel >> Select PHP version >> Switch To PHP Extensions >> Here check mysql is selected or not.
version.png


mysql.png

  • Secondly, check your .htaccess file which you are using. You have to tried to rename that file or you can upload basic htaccess file by removing unwanted code from file once. This is because it may be possible that you are calling modules or anything in file which is not available.
htaccess.png
Author
Bhawani Singh
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Bhawani Singh

Top