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

5 Steps to Fix

Learn how to fix the ‘Your PHP installation appears to be missing the MySQL extension which is required by WordPress’ error with our step-by-step guide.

I want a free help
Drop us an email

help@wpcare.ai

Give us a ring

+420 731 115 117

Book free call

click here

Hop onto Discord

click to join

Messages for this Error

  • 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

Quick Explanation of the Error

The error “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” occurs whenever WordPress fails to communicate with the MySQL database. This issue can lead to your website not functioning properly, affecting user experience and potentially causing loss of traffic. Unlike issues with invalid passwords, this problem arises before the connection is attempted.

WordPress identifies that the server lacks the necessary environment to interact with any database. The “Your php installation appears to be missing the MySQL extension which is required by WordPress” issue can stem from missing PHP packages, outdated PHP installations, or incompatibilities between the PHP and WordPress versions. These incompatibilities can occur if either PHP or WordPress needs to be updated.

Can’t resolve the issue “Your php installation appears to be missing the MySQL extension which is required by WordPress” or don’t want to deal with it?

Get you website fixed today!

Verifying PHP Version

As first step to resolve “Your php installation appears to be missing the MySQL extension which is required by WordPress” is to ensure compatibility, check your PHP version and compare it with the WordPress version you are running.

Create a PHP Info File

Use your hosting file manager or FTP to create a file named info.php. Add the following code to it:

<?php
phpinfo();
?>

Access the File

Open the file in your browser at:

http://yourdomain.tld/info.php

This will open a page with information about the running PHP instance.

The PHP version will be displayed at the top of the page.

Compare PHP Compatibility

Use this compatibility chart to check if your PHP version supports your WordPress installation. https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/

Remember, it’s crucial to keep your PHP version updated. The latest supported versions are on PHP’s official site. By doing so, you’re taking a proactive step towards ensuring your WordPress site’s optimal performance and security. This responsibility falls on you as a website administrator, and your proactive approach will be appreciated by your users.
https://www.php.net/supported-versions.php

Updating WordPress

Nest step to resolve “Your php installation appears to be missing the MySQL extension which is required by WordPress” is to check if your PHP version is newer than what your installed WordPress version supports, updating WordPress is the best solution. Since you might not have admin access due to this error, update WordPress via FTP.

Backup Your Site

Use your hosting tools or download all website data and database manually.

Download Compatible WordPress Version

Visit WordPress releases to download a version that works with your PHP setup.
https://wordpress.org/download/releases/

Extract the Files

Unzip the downloaded archive and open the WordPress folder.

Open Your Website via FTP

Log in to your hosting via FTP and open WordPress folder.

Upload Files via FTP

From the extracted zip of the last version of WordPress, upload the files to your root directory. Allow the overwrite prompt to replace only WordPress core files without affecting user data.

Log In to WordPress Admin

After uploading, login to the admin dashboard and update the database if prompted. Rest assured, this process is designed to be safe and straightforward, and you can proceed with confidence.

Can’t resolve the issue “Your php installation appears to be missing the MySQL extension which is required by WordPress” or don’t want to deal with it?

Get you website fixed today!

Checking the Environment

If the error persists after aligning WordPress and PHP versions the next step to resolve the “Your php installation appears to be missing the MySQL extension which is required by WordPress”, use the info.php file to verify your PHP environment. Cross-check the PHP extensions required for WordPress here. https://make.wordpress.org/hosting/handbook/server-environment/#php-extensions

Look for the absence of the ‘mysqli’ extension in the info.php output. ‘mysqli’ is a PHP extension that allows PHP to communicate with MySQL databases.

Your php installation appears to be missing the mysql extension which is required by WordPress php info

It’s a crucial component for WordPress to interact with the MySQL database. If it’s missing, this is likely the cause of the error.

Can’t resolve the issue “Your php installation appears to be missing the MySQL extension which is required by WordPress” or don’t want to deal with it?

Get you website fixed today!

Installing Missing PHP Packages

If the MySQL extension is missing, the next step to resolve the “Your php installation appears to be missing the MySQL extension which is required by WordPress”, is to install it. This requires access to the server’s command line.

For Shared Hosting

Contact your hosting provider to add the PHP package. If your PHP version is below 8, request an upgrade to 8.x for better compatibility.

For Ubuntu/Debian

Run these commands to install the required packages:

Update the package list:

sudo apt-get update

Install PHP extensions, including mysqli:

sudo apt-get install php-curl php-dom php-mbstring php-exif php-fileinfo php-igbinary php-imagick php-intl php-xml php-zip php-redis php-memcached php-opcache

Restart the apache/nginx services:

For apache:

sudo service apache2 restart

For nginx:

sudo service nginx restart
For CentOS

Run these commands to install the required packages:

Update the package list:

sudo yum update

Install PHP extensions, including mysqli:

sudo yum install php-curl php-dom php-mbstring php-exif php-fileinfo php-igbinary php-imagick php-intl php-xml php-zip php-redis php-memcached php-opcache

Restart the apache/nginx services:

For apache:

sudo apachectl -k restart

For nginx:

sudo systemctl restart nginx

Updating PHP

Last step to resolve “Your php installation appears to be missing the MySQL extension which is required by WordPress” vould be to update PHP on the server.

To update PHP, refer to your operating system and web server instructions.

For example, follow this guide for Ubuntu.
https://php.watch/articles/php-8.3-install-upgrade-on-debian-ubuntu

Newer systems like Ubuntu 20.04 are not supported for PHP 8, but it should be possible to install it on ubuntu 16 and ubuntu 18 servers. For these versions, however, we strongly recommend upgrading the operating system to the latest LTS.

Ensure you upgrade to the latest LTS version of your OS when needed. Updating PHP ensures optimal speed and security.

This should conclude all steps that you need to take to resolve the “Your php installation appears to be missing the MySQL extension which is required by WordPress”.

Can’t resolve the issue “Your php installation appears to be missing the mysql extension which is required by WordPress” or don’t want to deal with it?

Get you website fixed today!

More errors that you can solve

  • There has been a critical error on this website
  • WordPress error establishing a database connection
  • WordPress repair database
  • Your php installation appears to be missing the MySQL extension which is required by WordPress

Free WordPress help

From issues, speed, and automation to increasing profits… 100% free, no strings attached, no pressure.

Contact our WordPress Care Support

Get ready (perhaps for the first time) to understand a techie. For free. Clearly. Expertly.

Because we are WordPress Care (how do our services differ from regular hosting?). Share your number, and we’ll call you. Or reach out to us through chat, Discord, email, or phone, whichever you prefer.

Popup