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

前端 未结 25 1137
死守一世寂寞
死守一世寂寞 2020-11-28 08:48

How do I fix the error below?

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

I

相关标签:
25条回答
  • 2020-11-28 09:09

    For me (ubuntu 16.04) the winner was:

    sudo apt install php7.0-mysql
    
    0 讨论(0)
  • 2020-11-28 09:11

    I have resolved the issue just adding following code in .htaccess file. I hope this will work for you guys also.

    Step 1: Change the PHP version form the server.

    Step 2: Add the following code in your .htaccess file according to your PHP version (Selected from the server).

    To switch to PHP 4.4:

    AddHandler application/x-httpd-php4 .php
    

    To switch to PHP 5.0:

    AddHandler application/x-httpd-php5 .php
    

    To switch to PHP 5.1:

    AddHandler application/x-httpd-php51 .php
    

    To switch to PHP 5.2:

    AddHandler application/x-httpd-php52 .php
    

    To switch to PHP 5.3:

    AddHandler application/x-httpd-php53 .php
    

    To switch to PHP 5.4:

    AddHandler application/x-httpd-php54 .php
    

    To switch to PHP 5.5:

    AddHandler application/x-httpd-php55 .php
    

    To switch to PHP 5.6:

    AddHandler application/x-httpd-php56 .php
    

    To switch to PHP 7:

    AddHandler application/x-httpd-php7 .php
    

    To switch to PHP 7.1:

    AddHandler application/x-httpd-php71 .php 
    
    0 讨论(0)
  • 2020-11-28 09:13

    I had same issue as mentioned " Your PHP installation appears to be missing the MySQL extension which is required by WordPress" in resellerclub hosting.

    I went through this thread and came to know that php version should be greater than > 5.6 so that wordpress will automatically gets converted to mysqli

    Then logged into my cpanel searched for php in cpanel to check for the version, luckly was able to find that my version of php was 5.2 and changed that to 5.6 by making sure mysqli is tick marked in the option window and saved it is working fine now.

    0 讨论(0)
  • 2020-11-28 09:14

    After nearly seven years this keeps getting different answers.† Many are similar--but none identical--to what worked for me. Here's what worked for me (Ubuntu server).

    Moving a site to a new server, forgot to install the PHP MySQL module/extension. I ran a quick

    apt-get install php-mysql
    

    and then

    apachectl restart
    

    Bada bing. No php5, php7; just plain php-mysql.

    0 讨论(0)
  • 2020-11-28 09:14

    When you upgarde your php version, make sure, apache2 follows. You can create a phpinfo() file which could show that apache is still using the old php version.

    In this case you should use the a2dismod php-old-version and a2enmon php-mod-version commands

    Exemple :

    in ubuntu, your grab the old version from /etc/apache2/mods-enabled, or from the version shown by the phpinfo file, and you grab the new one from /etc/apache2/mods-available

    > sudo a2dismod php5.6
    > sudo a2enmod php7.1
    > sudo service apache2 restart
    
    0 讨论(0)
  • 2020-11-28 09:14

    This Error is created by the WP core file /wp-includes/load.php and the function name is wp_check_php_mysql_versions().

    The older versions of the WP does not support MySqli. But the latest WP versions support both MySql and MySqli extensions without bothering installed PHP versions.

    Solved my problem 100%

    In my case, I just updated the Wordpress core files manually and solved the issue :)

    0 讨论(0)
提交回复
热议问题