missing the MySQL extension 📝 WordPress

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

PHP doesn’t have the mysqli extension loaded, so WordPress can’t talk to the database.

Seen on: WordPress

Meaning

Fresh servers or PHP version switches often lack php-mysql. The CLI and web PHP can be different versions with different extensions.

Common causes

  • php-mysql (mysqli) package not installed for this PHP version
  • PHP upgraded/switched without extensions
  • Web server using a different PHP than expected

⚡ Quick fix

  1. Install the extension for the PHP version in use
  2. Restart PHP-FPM/Apache
  3. Check phpinfo() for mysqli

Detailed fix by platform

Ubuntu

  1. php
    php -v
    sudo apt install php8.3-mysql
    sudo systemctl restart php8.3-fpm

How to diagnose

  1. Version — PHP used by the web server
  2. Extension — mysqli in phpinfo?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.