This WordPress tutorial explains how to solve the error: “Your php installation appears to be missing the mysql extension which is required by wordpress.

After reading this tutorial, you’ll know how to solve this problem using different methods. Users may choose to use Cpanel or FTP for some steps; both ways are explained below.

This article includes screenshots, making it easy for all WordPress users to follow the steps described.

What does the error mean?

The “Your php installation appears to be missing the mysql extension which is required by wordpress.” means the Mysql extension required by older PHP versions is missing. It also may mean your PHP version is not compatible with your WordPress version.

Yet even in case you are using an old WordPress version, it is better to confirm your PHP version. Below you follow instructions to learn it.

If you already know you are using the last PHP version, press here to learn how to update your WordPress.

How to check and edit the PHP version using Cpanel:

To learn and change your PHP version, access your Cpanel and find the Select PHP Version option shown in the following screenshot.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-1.png" data-lazy- height="397" src="data:image/svg xml,” width=”678″>

The PHP Select page shows the current PHP version, as you can see in the image below.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-2.png" data-lazy- height="398" src="data:image/svg xml,” width=”679″>

By pressing the n.n (Current) dropdown menu shown in the following image. In my case, I’m using the 7.4 PHP version. If I want you to set a newer PHP version, select it.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-3.png" data-lazy- height="395" src="data:image/svg xml,” width=”622″>

You don’t need to press any Save button; your PHP will change when you select a different version.

Learning your PHP version by creating phpinfo.php file:

The steps described in this section can also be followed using an FTP client. If you prefer to do it using FTP press here.

Login to your Cpanel account and scroll down to find the File Manager tool shown in the screenshot below. Press it.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-4.png" data-lazy- height="388" src="data:image/svg xml,” width=”667″>

The Cpanel File Manager looks similar to an FTP client, but it allows you to create the file on the server itself (without uploading it from your device).

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-5.png" data-lazy- height="587" src="data:image/svg xml,” width=”1187″>

First, move to the website root directory containing the wp-content, wp-includes, etc., directories.

Once on the website root directory in File Manager, press the File located in the left upper corner below.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-6.png" data-lazy- height="310" src="data:image/svg xml,” width=”527″>

In the New File Name field, type phpinfo.php. Then press the Create New File button.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-7.png" data-lazy- height="298" src="data:image/svg xml,” width=”615″>

Once the phpinfo.php file is created, find it in the File Manager and right-click it. On the displayed menu, press the Edit option, as shown in the screenshot below.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-8.png" data-lazy- height="390" src="data:image/svg xml,” width=”712″>

When the encoding confirmation box shows up, press the Edit button as shown in the following image.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-9.png" data-lazy- height="429" src="data:image/svg xml,” width=”614″>

Just paste the following code within the phpinfo.php file and press the Save Changes button.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-10.png" data-lazy- height="244" src="data:image/svg xml,” width=”877″>

Now access YourDomain.com/phpinfo.php. Just add /phpinfo.php after your domain name, as shown below.

<img alt="" data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-11.png" height="34" src="data:image/svg xml,” width=”243″>

You will see a screen similar to the one below. On the top of the page, you will see your current PHP version.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-12.png" data-lazy- height="395" src="data:image/svg xml,” width=”650″>

By scrolling down, you can see if it supports Mysql. You also can press Ctrl F and type mysql to find it fast.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-13.png" data-lazy- height="370" src="data:image/svg xml,” width=”1187″>

Checking your PHP version using an FTP client:

The steps described below are similar to the previously explained using Cpanel.

First, on your computer, create a text file using Notepad if you are using Windows or nano/Pluma if you are using Linux.

Paste the following code within the file.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-15.png" data-lazy- height="432" src="data:image/svg xml,” width=”551″>

Both of you are using Windows Notepad or a graphical text editor in Linux; press File on the left upper corner and press the Save As option.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-16.png" data-lazy- height="427" src="data:image/svg xml,” width=”549″>

Name the file as phpinfo.php and save it.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-17.png" data-lazy- height="455" src="data:image/svg xml,” width=”895″>

Now login to your FTP server using your FTP client of choice and upload the file you just created to your website root directory.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-18.png" data-lazy- height="373" src="data:image/svg xml,” width=”845″>

Now on your browser, type YourDomain.com/phpinfo.php. Just add /phpinfo.php after your domain name, as shown in the following image.

<img alt="" data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/24.png" height="34" src="data:image/svg xml,” width=”243″>

You will see a similar screen to the one below. On the top of the page, you will see the current PHP version you are using.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-19.png" data-lazy- height="395" src="data:image/svg xml,” width=”650″>

By scrolling down, you can see if it supports Mysql. You also can press Ctrl F and type mysql to find it quickly.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-20.png" data-lazy- height="370" src="data:image/svg xml,” width=”1187″>

Updating your WordPress version:

If you have an updated PHP version, the problem may be your WordPress version. In this case, login to your WordPress dashboard. If your WordPress is outdated, you will see “WordPress N.N is available! Please update now.” on the top of the page.

You can press Please update now. Or you can press the Dashboard option on the left menu; both ways are ok.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-21.png" data-lazy- height="433" src="data:image/svg xml,” width=”912″>

If you pressed the Dashboard option, on the displayed suboptions, press Updates.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-22.png" data-lazy- height="283" src="data:image/svg xml,” width=”545″>

Press the Update to version N.N button on the WordPress Updates page, as shown below.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/Your-php-installation-23.png" data-lazy- height="422" src="data:image/svg xml,” width=”576″>

After processing, your WordPress will be up to date.

Conclusion:

As you can see, solving the message error “Your php installation appears to be missing the mysql extension which is required by wordpress.” is pretty easy. Users can follow different methods to deal with this. Before this problem, I always focus on the PHP and WordPress versions. Contrary to most WordPress problems, you don’t need to start discarding plugins to find the error cause here. Instead, use the phpinfo.php file and check your WordPress version to decide how to implement the solution.

Thank you for reading this WordPress tutorial explaining how to solve this PHP error. I hope it was useful. Keep following us for additional quality WordPress tutorials.

About the author

<img data-del="avatar" data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/linuxinstitute_icono-150×150.png622057afed3cc.jpg" height="112" src="data:image/svg xml,” width=”112″>

David Adams

David Adams is a System Admin and writer that is focused on open source technologies, security software, and computer systems.