Cannot connect to the database because the mysqli extension is missing

Show

In this article, we will cover the most common reasons of Your PHP installation appears to be missing the MySQL extension which is required by WordPress error, and how it can be fixed.

  • Disabled extensions in Select PHP version
  • Custom PHP version
  • php.ini configuration file
  • WordPress and PHP incompatibility

Disabled extensions in Select PHP version

MySQL extension refers to the PHP extension that is required for WordPress websites to communicate with the database. Thus, the first point to investigate is to check the PHP extensions enabled for your account.

For this purpose, log into your cPanel account and go to the Select PHP Version menu:

For cPanel Basic theme:

Cannot connect to the database because the mysqli extension is missing

For cPanel Retro theme:

Cannot connect to the database because the mysqli extension is missing

Find mysqli (for PHP version 7.0 and higher) and mysql (for PHP version 5.6 and lower) and make sure they are checked:

Cannot connect to the database because the mysqli extension is missing

Custom PHP version

In case the required extension is enabled in your Select PHP Version menu, it is required to check if a separate PHP version is enabled for your website.


This can be done in the following way:

1. Navigate to the cPanel File Manager menu:

For cPanel Basic theme:

Cannot connect to the database because the mysqli extension is missing

For cPanel Retro theme:

Cannot connect to the database because the mysqli extension is missing

2. Find the .htaccess file for the addon domain in question. The steps for how to find it can be located here.


3. Make sure that the correct SetHandler directive is present there. You can check the code for Apache and LiteSpeed servers here.

NOTE: In case your PHP was changed before the migration to LiteSpeed web server, your rule for Apache web server will not work and it will be required to change the rule to the LiteSpeed version.

php.ini configuration file

When a different PHP version is set for the domain, all the PHP extensions should be enabled manually in the php.ini file. Thus, it is required to enable mysql and mysqli extensions in your configuration file. For this purpose:

1. Navigate to the cPanel File Manager menu:

For cPanel Basic theme:

Cannot connect to the database because the mysqli extension is missing

For cPanel Retro theme:

Cannot connect to the database because the mysqli extension is missing

2. Proceed to the public_html folder and press Edit button on the php.ini file:

Cannot connect to the database because the mysqli extension is missing

3. Add the following lines to the file:

extension=mysql.so
extension=mysqli.so

It is possible to check if your PHP configuration includes mysql or mysqli extension by setting up a phpinfo function as described here.

Once the file is created, access your phpinfo page and look for  mysql or mysqli section:

Cannot connect to the database because the mysqli extension is missing

WordPress and PHP incompatibility

Some old WordPress versions are designed to work with the mysql PHP extension that is available with PHP 5.6 and lower. In case your website is based on an outdated WordPress and the current PHP version is 7.0 or higher, it will be required to either change your PHP version to a lower one or upgrade the WordPress installation so it becomes compatible with the current PHP version set for your website.

You can check how to change the PHP version here.

That's it!

Need any help? Contact our HelpDesk

How we fix the MySQLi extension missing phpMyAdmin? So far, we have seen what is MySQLi extension missing in phpMyAdmin error. The solution for this error is to enable the MySQLi extension on the server.

mysqli extension is missing (the web trainer)

mysqli extension is missing (the web trainer)

Cannot connect to the database because the mysqli extension is missing
Mysqli Extension Is Missing (The Web Trainer)

Is MySQLi extension installed?

Check if MySQLi is Installed

The first step is to check if MySQLi extension is installed. You can do that by visiting a phpinfo() page that you made, or by running this command: php -m | grep mysqli.

Is MySQLi installed by default?

On Windows, for PHP versions 5.3 and newer, the mysqli extension is enabled and uses the MySQL Native Driver by default. This means you don’t need to worry about configuring access to libmysql.

How do I download MySQLi?

Downloading MySQL

The MySQLi extension is designed to work with MySQL version 4.1. 13 or newer, So have to download MySQL. All downloads for MySQL are located at MySQL Downloads. Pick the latest version number for MySQL Community Server you want and, as exactly as possible, the platform you want.

How configure MySQLi in PHP?

It’ll automatically enable the mysqli extension for the PHP because connect using mysql is deprecated in PHP 7. If not an Ubuntu user then you can just rename php-prodcution. ini file to php. ini and enable the extension by removing semicolon in the php.

How do I fix phpMyAdmin error?

How to fix an error of PhpMyAdmin access denied in xamp mySql.

  1. So , you have to open XAMPP Control Panel ->Click MySql Config->Click my.ini. …
  2. You have to write this line skip-grant-tables after [mysqld].
  3. Open xamp folder ->PhpMyAdmin .You will see config.inc.php file in phpMyAdmin folder, just open it with notepad++


See some more details on the topic the mysqli extension is missing here:


The mysqli extension is missing. Please check your PHP …

In your Xampp folder, open php. · Search for extension=mysqli (Ctrl+F), if there are two, look for the one that has been uncommented (without “;” …

+ Read More

MySQLi extension missing phpMyAdmin – Quick fix! – Bobcares

How we fix the MySQLi extension missing phpMyAdmin? · 1. First, we login to the WHM as root. · 2. Then we search for “EasyApache4” or go to …

+ View More Here

The mysqli extension is missing. Please check your PHP …

Solution: · In your Xampp folder, open php. · Search for extension=mysqli (Ctrl+F), if there are two, look for the one that has been uncommented (without “;” …

+ Read More Here

How do I fix MySQLi extension is missing please check PHP …

How to solve MySQLi extension is missing error? … This part is little tricky, although not very difficult. First, we need to install PHP 7.0 …

+ View More Here

Where is located php INI?

user. ini file is the default configuration file for running applications that require PHP. It is used to control variables such as upload sizes, file timeouts, and resource limits. This file is located on your server in the /public_html folder.

Does phpMyAdmin work with php 8?

Your Apache2 web server including PHP 8, the MariaDB server and phpMyAdmin is now ready to use. By default, the web directory is “/var/www/html/”. You can access the phpMyAdmin web interface in your web browser by appending “/phpmyadmin” to the IP address or domain of your server.

How can I enable the MySQLi extension in PHP 8?

how to enable MySQLi extension on web-server with cPanel?

  1. Step 1 : Log into WHM panel.
  2. Step 2 : Go to Home » Software » EasyApache 4.
  3. Step 3 : Click on “Customize”
  4. Step 4 : Go to PHP Extensions.

Where is MySQLi so located?

The . so files should be located inside your php extension directory. You can use phpinfo() function to find the location of your php extension directory or you can use php -i from the command line.

Does xampp has MySQLi?

3-1, XAMPP 1.8. 2-2, XAMPP 1.8. 1. Because these xampp versions also support Mysqli by default.


Phpmyadmin Ubuntu 16.04 – The mysqli|mysql extension is missing. Please check your PHP configuration

Phpmyadmin Ubuntu 16.04 – The mysqli|mysql extension is missing. Please check your PHP configuration

Phpmyadmin Ubuntu 16.04 – The mysqli|mysql extension is missing. Please check your PHP configuration

Cannot connect to the database because the mysqli extension is missing
Phpmyadmin Ubuntu 16.04 – The Mysqli|Mysql Extension Is Missing. Please Check Your Php Configuration

Is Mysqli included in PHP?

Installation / Runtime Configuration

The MySQLi extension was introduced with PHP version 5.0. 0. The MySQL Native Driver was included in PHP version 5.3.

How do I install PHP?

How to Install PHP

  1. Step 1: Download the PHP files. You’ll need the PHP Windows installer. …
  2. Step 2: Extract the files. …
  3. Step 3: Configure php. …
  4. Step 4: Add C:\php to the path environment variable. …
  5. Step 5: Configure PHP as an Apache module. …
  6. Step 6: Test a PHP file.

What is Mysqli and why it is used?

The MySQLi Extension (MySQL Improved) is a relational database driver used in the PHP scripting language to provide an interface with MySQL databases. There are three main API options when considering connecting to a MySQL database server: PHP’s MySQL Extension.

What’s the difference between MySQL and MySQLi?

Basically, MySQL is the old database driver, and MySQLi is the Improved driver. The “i” stands for “improved” so it is MySQL improved. MySQLi can be done procedural and object-oriented whereas MySQL can only be used procedurally. Mysqli also supports prepared statements which protect from SQL Injection.

Is MySQLi deprecated?

The oldest one uses the MySQL extension, which was deprecated as of PHP 5.5 and fully removed in PHP 7. The mysql() function no longer works in PHP 7. It has been replaced with mysqli().

Is MySQL database free?

MySQL is free and open-source software under the terms of the GNU General Public License, and is also available under a variety of proprietary licenses.

What is better MySQLi or PDO?

Performance. While both PDO and MySQLi are quite fast, MySQLi performs insignificantly faster in benchmarks – ~2.5% for non-prepared statements, and ~6.5% for prepared ones. Still, the native MySQL extension is even faster than both of these.

What is MySQL data?

MySQL is an open-source relational database management system. As with other relational databases, MySQL stores data in tables made up of rows and columns. Users can define, manipulate, control, and query data using Structured Query Language, more commonly known as SQL.

What does Mysqli_query return?

For successful queries which produce a result set, such as SELECT, SHOW, DESCRIBE or EXPLAIN , mysqli_query will return a mysqli_result object. For other successful queries, mysqli_query will return true .

Why MySQL is not working in XAMPP?

Fixing the MySQL server not starting in XAMPP is done by reverting back the data files pre-issue. Navigate to your XAMPP MySQL directory ( C:\xampp\mysql ). Create a new folder called FIX_BACKUP . Copy C:\xampp\mysql\backup and C:\xampp\mysql\data into C:\xampp\mysql\FIX_BACKUP .


Windows Server IIS (phpMyAdmin – Error)

Windows Server IIS (phpMyAdmin – Error)

Windows Server IIS (phpMyAdmin – Error)

Cannot connect to the database because the mysqli extension is missing
Windows Server Iis (Phpmyadmin – Error)

Why phpMyAdmin is not working in XAMPP?

To access phpMyAdmin from XAMPP you will need to make sure you have Apache and MySQL running in the XAMPP control panel by clicking the start buttons under the Actions column. If Apache and MySQL are green then all is well. Then you can click the “Admin” button in the MySQL row and that will launch phpMyAdmin.

How do I access localhost phpMyAdmin?

Once phpMyAdmin is installed point your browser to http://localhost/phpmyadmin to start using it. You should be able to login using any users you’ve setup in MySQL. If no users have been setup, use admin with no password to login.

Related searches to the mysqli extension is missing

  • the mysqli extension is missing php 7 4 ubuntu
  • phpmyadmin – error the mysqli extension is missing
  • is mysqli deprecated
  • the mysqli extension is missing php 7 windows
  • the mysqli extension is missing php 7.4 ubuntu
  • the mysqli extension is missing. phpmyadmin
  • phpmyadmin error the mysqli extension is missing ubuntu
  • mysqli xampp
  • install mysqli windows
  • The mysqli extension is missing wamp
  • how to enable php mysqli extension
  • how to enable mysqli in xampp
  • mysqli centos
  • mysqli extension install ubuntu
  • install mysqli ubuntu
  • php mysqli
  • Mysqli centos
  • cannot connect to the database because the mysqli extension is missing
  • the mysqli extension is missing phpmyadmin windows 10 xampp
  • the mysqli extension is missing. phpmyadmin ubuntu
  • the mysqli extension is missing php 7.2 ubuntu
  • the mysqli extension is missing wamp
  • Install mysqli windows

Here are the search results of the thread the mysqli extension is missing from Bing. You can read more if you want.


You have just come across an article on the topic the mysqli extension is missing. If you found this article useful, please share it. Thank you very much.

How do I fix Mysqli extension is missing?

You can solve it too if you follow these steps:.
you have to install PHP to C:/php or your current version locate it to this path and specify it as a system variable..
then open xampp program and click config and open php.ini and uncomment the following lines: extension=pdo_mysql extension=pdo_mysql extension=openssl..

How can I fix your PHP installation appears to be missing the MySQL extension which is required by WordPress?

How to Fix the Wordpress MySQL Extension Error.
Check what PHP version you're using..
Update WordPress..
Update your plugins..
Verify that the MySQL extension is installed..
Verify that the PHP extension is configured correctly..

How do I know if MySQLi is enabled?

Check if MySQLi is Installed You can do that by visiting a phpinfo() page that you made, or by running this command: php -m | grep mysqli.

Does xampp support MySQLi?

Because these xampp versions also support Mysqli by default.