skip to Main Content

I am facing this when i go to localhost

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

Please check that the mysqli PHP extension is installed and enabled.

If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress support forums.**

I have followed and each and every step from here : https://ubuntu.com/tutorials/install-and-configure-wordpress

Kindly tell me the appropriate solution i could not find any

2

Answers


  1. looks like you may have missed installing the mysql extension for PHP.

    The below steps should get you going. Change php-mysql to the correct name if you installed a specific version of PHP, ie. php8.2-mysql, if you installed PHP v8.2.

    1. sudo apt install php-mysql
    2. Confirm the extension is enabled in your php.ini file. Look for extension=mysqli and ensure it is uncommented (no semicolon at the beginning).
    3. Restart your web server (e.g., Apache or Nginx) to apply the changes.
    Login or Signup to reply.
  2. I agree with the above answer. It appears that the MySQL extension for PHP may not have been installed properly. You need to ensure that the extension is installed and enabled in your PHP configuration. Here are the steps to address this:

    1. sudo apt install php-mysql
    2. After installation, ensure the mysqli extension is enabled in your PHP configuration file (php.ini). Look for the line extension=mysqli and make sure it’s uncommented. If there’s a semicolon at the beginning, remove it.
    3. Restart your web server. For Apache sudo service apache2 restart
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search