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

前端 未结 25 1133
死守一世寂寞
死守一世寂寞 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 08:57

    This MySQL library worked for me:

    sudo apt-get install php5-mysqlnd-ms
    
    0 讨论(0)
  • 2020-11-28 08:57

    If people are using shared Linux hosting with cPanel (Godaddy, Reseller club, Hostgator or any Shared Hosting), try the following:

    Under Software and Services tab -> Select PHP Version -> PHP Selectors | Extentions

    Tick all MySQL related extensions, save it and you are done. Please check the attached image.

    Image showing the extensions in cPanel

    0 讨论(0)
  • 2020-11-28 08:57

    If you have Wordfence plugin installed I found commenting out the suPHP_ConfigPath lines in the .htaccess file brought the website back to life:

    # Wordfence WAF
    #<IfModule mod_suphp.c>
    #   suPHP_ConfigPath '/home/a1614947/public_html'
    #</IfModule>
    

    I've reported this to Wordfence too.

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

    Check the

    extension_dir =
    

    remove it if it is there. that should fix the problem.

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

    in the end i found a solution First, make sure MySQL server is running. Type the following command at a shell prompt:

    /etc/init.d/mysql status

    If MySQL is not running, enter:

    /etc/init.d/mysql start

    If MySQL is not installed, type the following command to install MySQL server:

    apt-get install mysql-server

    Make sure MySQL module for php5 is installed:

    dpkg --list | grep php5-mysql

    To install php5-mysql module enter:

    apt-get install php5-mysql

    Next, restart the Apache2 web server:

    /etc/init.d/apache2 restart

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

    In my case, using CPanel PHP selector and selecting the mysqli and mysqlnd worked. Ensure to save and recheck once

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