WordPress missing MySQL after a PHP change

‘Your PHP installation appears to be missing the MySQL extension.’

Abstract server pathway showing a missing database runtime component

It is an alarming message, particularly when a business website has just disappeared after a hosting change or PHP update. But it does not establish that the database has been deleted, corrupted or needs restoring. More often, WordPress is being served by a PHP runtime that no longer has the database driver it expects.

For a service business in Dubai, the UAE, Liverpool or the wider UK, that distinction matters. Chasing database recovery while the active PHP handler is missing mysqli can keep the website offline longer than necessary and send staff down a fairly expensive rabbit hole.

Preserve the exact message before changing anything

Take a screenshot or copy the complete wording from the browser, including any reference to MySQL, mysqli, PHP version or a database connection. Record the affected domain and the approximate time the issue began.

Also note what changed. It may have been a hosting migration, a control-panel PHP switch, a server upgrade, a new PHP handler, or an update applied by the host. A vague report of the site being broken after maintenance is less useful than knowing the domain was moved from one PHP handler to another at 10:30 on Tuesday.

Do not start by resetting the database password or restoring a backup. Those actions may be appropriate for a proven credentials or data problem, but this symptom is a runtime prerequisite problem before it is a data-recovery problem.

Why WordPress reports a missing MySQL extension

WordPress core checks whether mysqli_connect is available unless a database drop-in is present. When that check fails, WordPress reports that the mysqli extension should be installed and enabled. The relevant behaviour is documented in the WordPress core PHP and MySQL version check.

In plain terms, the PHP process handling the website request cannot see the normal database connection function. WordPress therefore cannot begin its usual conversation with the stored database.

A WordPress missing MySQL extension error after a PHP update usually means the PHP runtime serving that domain does not have mysqli available or enabled. Record the exact error, identify the web PHP handler assigned to the affected domain, and ask the server administrator to inspect that specific environment. Retest the same website request after a narrowly scoped correction before considering database recovery.

Find the PHP runtime serving the actual domain

This is the bit that gets missed. A hosting account can contain several PHP versions and handlers. The version selected in a panel may not be the runtime actually serving the affected domain, subdomain or mapped site.

Ask the host or server administrator to confirm the active web PHP handler for the precise domain, then check whether its mysqli extension is installed and enabled. Avoid copying package commands from random forum posts. The right correction depends on the hosting stack, operating system, PHP build and how the provider manages extensions.

An illustrative hosting scenario

A host moves examplecompany.ae onto a newer PHP handler during routine platform work. The new handler serves PHP pages but does not load mysqli. WordPress immediately reports a missing MySQL extension, even though the database server, database files and WordPress credentials have not changed.

The repair route is for the administrator to correct the extension availability for that domain’s web runtime, then retest the affected request. Restoring the database in that situation would be solving a problem nobody had proved existed.

Keep a missing extension separate from a failed login

These issues can look similar from the outside because both may leave WordPress unavailable. They need different evidence.

  • Missing extension: PHP cannot provide the mysqli function WordPress needs to make a connection.
  • Database credentials issue: mysqli is available, but WordPress cannot authenticate with the configured host, database name, user or password.
  • Database server issue: the driver exists, but the database service is unavailable or cannot be reached from the web server.
  • General PHP failure: the site returns a server error before WordPress can show a useful database-related message.

If the site is returning a blank page or HTTP 500 response instead, keep that diagnosis in its own lane and read the WordPress error log after a PHP update. A 500 error does not automatically mean mysqli is missing, and treating every PHP incident as the same thing is how otherwise manageable repairs become a rummage through settings.

Ask for one scoped correction, then test the web request

The immediate request to the host or infrastructure administrator should be short and specific: confirm the PHP runtime serving the active domain, check that mysqli is available to that runtime, make the smallest appropriate environment correction, and retest the public web request.

After the correction, test more than the homepage. Load a public page, sign in to WordPress if appropriate, and check one action that reads or writes normal site data, such as opening a page in the editor or submitting a controlled contact form. A success message on a form does not prove email delivery, but it does help confirm WordPress can reach its database again.

If the website comes back, record the final PHP handler and the extension status in the site handover notes. It is dull admin work, which is exactly why it tends to be absent when somebody needs it.

Check scheduled callers separately

A repaired website request does not automatically prove every scheduled task is using the same PHP environment. Cron jobs, queue workers and command-line jobs can be configured differently from the web handler.

If a scheduled import, backup process or maintenance task still fails after the public site recovers, collect the PHP identity and extension availability for that caller separately. The reason a browser request and command-line check can disagree is covered in why WordPress and CLI can show different PHP versions. Do not let a healthy command-line result overrule a broken web request, or vice versa.

When to widen the repair review

Escalate beyond the PHP extension check when mysqli is confirmed available to the active web runtime and WordPress still cannot connect, when the exact message changes, or when several domains on the same server fail together. At that point, credentials, database host access, server service health, custom database drop-ins and wider hosting configuration may need proper review.

For a broader fault that is affecting availability, enquiries or routine WordPress administration, a focused website repair review in Dubai can help separate the immediate failure from the changes that made it possible.

If your site has reported this error after a hosting or PHP change, ask for a PHP environment check using the exact extension error and active domain handler. It is a more sensible opening move than treating the database as lost on first sight.