•

My WordPress site broke after a PHP upgrade

PHP is the programming language WordPress runs on, and your host looks after it, not WordPress. Every so often it moves on to a new version, and hosts move their customers with it, because old versions stop getting security fixes. WordPress itself copes well with new PHP versions. The trouble comes from plugins and themes that haven’t been updated in years, or custom code written for an older PHP.

Is this what you’re seeing?

  • Your WordPress website broke after upgrading PHP, or after your host emailed to say they’d upgraded it.
  • The site looks different after changing PHP versions: lines of “Deprecated” or “Warning” text at the top, or a layout that’s fallen apart.
  • Your Elementor site broke after updating PHP, or you can’t edit your Divi pages any more, although the live pages still show.
  • The site shows “There has been a critical error on this website”.
  • Your hosting provider says your plugins are incompatible with the new PHP version.
  • The site only works when you switch back to an old PHP version.

What usually causes it

An old plugin or theme that hasn’t kept up

Each new PHP version removes some old ways of doing things, and treats some old mistakes more strictly. Code that used to cause a quiet warning can cause a fatal error instead. A plugin that’s been abandoned by its author, or a theme that was never updated, is the usual culprit. How to tell: the error log or WordPress’s “technical issue” email names a folder in wp-content/plugins/ or wp-content/themes/, with words like “Uncaught Error”, “Call to undefined function” or “Unsupported operand types”. On wordpress.org, the plugin’s page shows when it was last updated.

Warnings printed on the page

Sometimes nothing has actually failed. The new PHP version simply produces more “Deprecated” and “Warning” notices, and the server or WordPress is set to show them on screen rather than log them quietly. They push the layout around and can stop parts of wp-admin working. How to tell: you can read the notices on the page, usually at the top, and each one names a file.

An out-of-date page builder

Page builders such as Elementor, Divi and WPBakery are large pieces of code, and older versions of them may not support newer PHP. The editor tends to fail first, because it does much more work than the live page. Premium builders often need an active licence to update, so a site whose licence lapsed years ago can be stuck on a version that predates the PHP it now runs on. How to tell: the live pages show but the builder won’t open, and the builder’s version number is well behind the current one.

A missing PHP extension

PHP comes with optional extensions for things like databases, images and other languages. A new PHP version on your host may not have the same set switched on as the old one. How to tell: Tools → Site Health in wp-admin warns about required or recommended modules that are missing, or the error mentions a function to do with images, databases or encoding.

The other way round: a plugin that needs newer PHP

A plugin can also be updated to a version that needs a newer PHP than your server has. WordPress checks a plugin’s “Requires PHP” line before updating it, but some hosts’ own update tools don’t. How to tell: the site broke overnight with no PHP change at all, and a plugin folder’s date matches. See why your host’s auto-updates can break your site.

What you can safely try

Take a backup first, through your host’s control panel if you can’t log in. Every step here can be undone.

  1. Check the inbox of your site’s admin email address for WordPress’s “Your Site is Experiencing a Technical Issue” email, and your control panel’s PHP error log. Either should name the plugin or theme. My guide to the critical error message explains how to read them.
  2. In your control panel’s PHP settings, see whether you can choose the previous version again. If you can, switch back so the site works while you sort out the cause. Write down which version it was on, and which it’s meant to move to.
  3. Go to Tools → Site Health. It shows the PHP version, missing modules, and plugins and themes with updates waiting.
  4. Update the plugin or theme the error named, if an update is available. Ideally do this on a staging copy, if your host offers one. Then switch the staging copy, or the live site, to the new PHP version and test again.
  5. If the plugin has no update and hasn’t been touched in years, check whether you still need it. If you don’t, deactivate it. If you do, look for a maintained plugin that does the same job.
  6. If warning text is showing on the page, open wp-config.php and check whether WP_DEBUG is set to true. Changing it to false hides the notices from visitors. Change it back to undo. It doesn’t fix the cause, so note which files the warnings named first.

When to stop and get help

  • Your host won’t let you switch back, or has set a date after which the old PHP version goes.
  • The error names your theme, and the theme was built for you or is no longer sold.
  • The page builder needs a licence you don’t have, or updating it several versions at once might break your layouts.
  • The plugin causing it runs your shop, bookings or memberships, so switching it off isn’t an option.
  • Fixing one error reveals another, and then another.

A real example

I don’t have a client case to share for this one, so here’s how it looks from my own hosting. In October, the shared hosting account that runs my own WordPress sites moved from PHP 8.2 to 8.3. Changes like that are routine, and most of the time nothing visible happens. What I watch for afterwards are the plugins: whether anything shows new warnings in the error log, and whether each plugin’s “Requires PHP” and last-updated date look healthy.

The same hosting also runs an installer tool that updates plugins overnight, and it doesn’t check whether a new plugin version needs a newer PHP than the server has. So a PHP problem doesn’t always start with a PHP change. When a site breaks in the morning, I compare the plugin folders’ dates with the overnight backups before guessing, so I know exactly what changed.

What I see most often on sites I’m asked to fix is the older version of this story: a site that was built years ago, kept running on an old PHP version because something broke the last time anyone tried, and now has to move because the host is retiring that version. That’s very fixable, but it’s worth doing on a copy of the site, one plugin at a time. If your site hasn’t been updated for a long time, see updating an old WordPress site safely.

Getting it fixed

Tell me which PHP version the site was on, which it’s moving to, and what you’re seeing. I take a full backup, find every plugin, theme or piece of code that fails on the new version, and update, replace or fix each one, so the site can stay on a supported PHP version. A WordPress repair is a fixed £119, which covers finding the problem and up to 90 minutes of fixing it. Most repairs fit in that, and you’re never charged more without agreeing first. If a very old site needs a lot of updating, I’ll tell you before I start, and larger jobs are £75 an hour.

Questions

Can someone fix PHP 8 compatibility issues on my WordPress site?

Yes. Usually it means updating or replacing a few plugins and fixing any custom code in the theme. Where a plugin is abandoned and essential, the choice is between a maintained replacement and a careful fix to the old code. I’ll explain the trade-off before doing either.

My host says my plugins are incompatible with PHP. How do I know which ones?

Ask the host which plugins they mean; they often have a list. Then check Tools → Site Health, each plugin’s wordpress.org page for its “Requires PHP” and last-updated date, and the PHP error log after switching a staging copy to the new version. The log is the most reliable of the three.

My site only works on an outdated PHP version. Can I just leave it there?

For a short while. Old PHP versions stop getting security fixes, hosts eventually remove them, and the longer you wait the more there is to update at once. Leaving it is a decision to fix it later under more pressure.

I can’t edit my Divi or Elementor pages since the PHP upgrade. Are my pages lost?

No. The page content is still in the database, which is why the live pages still show. The builder’s editor is failing on the new PHP. Updating the builder usually brings it back, but if it’s several versions behind, test the update on a staging copy first. If Elementor is out of step with Elementor Pro, see Elementor and Elementor Pro out of step.

Can I stop my host changing PHP without warning?

Usually not entirely, but most hosts email beforehand and many let you pick the version in the control panel. Make sure those emails reach someone who’ll act on them. Keeping plugins and themes up to date also makes a PHP change far less likely to catch you out, and that’s part of every care plan.

Written by Peter Claridge, who fixes WordPress sites for businesses across the UK from Reading. Last checked on WordPress 7.1, November 2026.