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

**Code:** `missing the MySQL extension` · **Category:** WordPress · **Seen on:** WordPress

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/wordpress/missing-mysql-extension)
