WordPress

Upgrading PHP on WordPress

Flipping the version itself takes about fifteen seconds. All the difficulty sits in the order in which you do everything else - and in two places the hosting panel will not remind you about.

10 min read

Changing the PHP version in a hosting panel takes about fifteen seconds. All the difficulty of the operation sits outside that click — in the order in which you do everything else. Done in the wrong order, it ends in a white screen and an hour of guessing what actually stopped working.

This guide is mostly about that order. The rest is a list of the places where the job most often gets left half done.

Which version to pick in December 2026

PHP runs to a fixed schedule: every branch gets two years of active support, then two years of security fixes only, and reaches end of life after four years. The state of play on 2 December 2026, straight from the official calendar on php.net:

  • PHP 8.2 — security fixes only, and those end on 31 December 2026. Less than a month away.
  • PHP 8.3 — active support ended a year ago, security fixes run to the end of 2027.
  • PHP 8.4 — active support until 31 December 2026, security until the end of 2028.
  • PHP 8.5 — active support until the end of 2027, security until the end of 2029.
  • PHP 8.6 — released on 19 November 2026, active support until the end of 2028, security until the end of 2030.
  • PHP 8.1 and older — past end of life. 8.1 closed on 31 December 2025 with release 8.1.34, 8.0 back in 2023.

WordPress officially recommends PHP 8.3 or greater, and says of 7.4 outright that a site will still run on it, but that the version has reached end of life and may expose the site. And here is something worth seeing in one piece, because guides rarely put the two facts side by side:

The WordPress recommendation now points at the oldest branch still worth considering. PHP 8.3 meets the requirement and is simultaneously down to security fixes only. If you are migrating now, you are doing it for a few years of quiet rather than for one quarter — which makes 8.4 or 8.5 the sensible target. With 8.2 there is nothing to weigh up: in four weeks a newly found vulnerability will no longer get a patch.

Why not go straight to the newest? Because the deadline is set not by the PHP calendar but by the oldest plugin you cannot get rid of. A newer version is not automatically better if a critical add-on does not support it — and you will find that out at the moment the cart or the contact form stops working.

Start by writing down what you have now

In the WordPress admin: Tools → Site Health → Info, then expand the Server section. It shows the current PHP version, and alongside it the memory limit and maximum execution time — both numbers come in useful later, when you are reading logs.

Writing this down is not a formality. It is your way back: if something breaks after the switch, the first move is returning to exactly that version, not trying to remember whether it was 8.0 or 8.1.

The order that decides everything

The worst case looks like this: an old WordPress, a dozen plugins nobody has updated, an old theme, PHP 7.4 — and a jump to the newest PHP. The site returns a 500, and you have a dozen suspects at once and no way to separate them.

So: the application first, the environment second.

  • A full backup of files and database — and a check that you can actually restore it. A backup nobody has ever restored is an assumption, not a safeguard.
  • Update WordPress core to the current version.
  • Update the active plugins and the theme.
  • Review your own plugins, the child theme and any hand-added code — those, not core, are usually what falls over on new PHP.
  • Only now change the PHP version.

The reason is diagnostic, not aesthetic. Once the application is up to date, changing PHP is one change, so a failure has one cause. Done on an old installation it is the twentieth change, and nobody knows which one it is about.

If the site earns money, walk the whole route on a copy or on a staging environment. "I will test on production, it is the weekend" is a plan that works right up to the first time it does not.

Compatibility: where to start

There is no point going through forty plugins in order. Start with the ones whose failure is expensive:

  • A shop — WooCommerce, the payment gateway, the courier integration, the accounting integration.
  • A company site — forms, bookings, multilingual, the CRM connection.

For each of them, check the vendor's site and the changelog. A declared PHP version is a good starting point. The absence of that information is not proof of a problem — but it is a reason to test that plugin first rather than last.

Treat separately the code nobody updates because there is nobody to do it: a snippet added to functions.php three years ago, a plugin written to order by a contractor you can no longer reach. That is the most common source of breakage after a PHP change, because it is the only part of the installation that has never had an update.

The switch itself

In most panels the PHP version is set per domain or per site, not for the whole account — in cyber_Admin the path runs through Serwer WWW → Strony WWW and the PHP settings tab, in DirectAdmin through Serwer WWW i domeny → Wersja PHP dla domen. The labels depend on the host, the mechanism is the same.

Two things worth knowing rather than discovering:

The switch may take a moment. Do not test a second after saving and do not conclude "it does not work". Above all, do not click through further versions hoping one will take — after three such attempts you no longer know what is actually set. Wait, open the site in a new browser window and check the version in Site Health.

The panel changes PHP for the site, not for the whole server. Jobs started from the system cron — WP-Cron moved to cron, backup scripts, your own commands — run under a separate PHP version for the command line, which this switch does not touch. That is why you meet installations where the site works perfectly and the mail queue has not gone out, or no backup has been made, for a week. If you have cron entries, check which version they execute under — usually visible in the path to the PHP binary inside the job.

Testing does not end at the home page

The home page is usually the simplest page on the whole site and most often the cached one. It can look perfect while half the site is down. Clear the cache — page and object — and work through the list:

  • the home page and the key subpages;
  • logging in to /wp-admin/;
  • opening and saving a sample post or page;
  • sending the contact form;
  • e-mail sent by the site — whether it arrives at all;
  • in a shop: the cart and the full order path, including a payment in test mode;
  • search, menus, anything generated dynamically;
  • external integrations, especially the ones called in the background;
  • another look at Site Health;
  • the PHP error log — even if nothing looks broken.

That last point is the one most often skipped and the one that says the most.

"It works" and "it reports no errors" are two different states. New PHP branches retire old constructs gently: the code keeps running, but every request appends a deprecation notice to the log. The site looks healthy while the log grows by gigabytes, sometimes filling the hosting disk quota. A fatal error is visible at once and therefore less dangerous — what causes trouble is the thing that works and screams at the same time. After a PHP change, open the log and count what repeats in it: that is your list of things to fix before the next branch turns those notices into errors.

For diagnosis it is easier to send messages to a file than to the screen — WP_DEBUG_LOG set to true with WP_DEBUG_DISPLAY set to false writes everything to wp-content/debug.log and shows visitors nothing. Turn both off once you are done.

If the site went down after the change

The reflex is to restore the backup. That is usually the wrong first move, because restoring also rolls back content added since the backup was taken, and it explains nothing about the cause.

The first move is going back to the previous PHP version. It is immediate, it loses nothing, and it is a diagnostic test: if the site works again, you know the problem is some component's compatibility with the new PHP, rather than the application update itself or a server failure. Only with that established does it make sense to start hunting for the culprit.

Then to the log. Look for lines reading PHP Fatal error, Uncaught TypeError, and calls to a function that no longer exists. Every such line contains a file path, and the path names a specific plugin or a specific theme. This is not guesswork — it is the culprit's address stated outright.

From there it is straightforward: stay on the old PHP, update or replace the named component, switch the new PHP back on, test again. If the plugin has no version compatible with the new PHP and no successor, that is not an upgrade problem — it is a decision to make, because you have just learned that one add-on is holding the whole site on a version past its end of life.

What a PHP upgrade will not fix

Newer PHP can be faster, but it is not a "speed up my site" button. If what kills your load time is a query without an index, a badly written plugin or thirty uncompressed photos in a gallery, a newer interpreter will not change that — it will run the same bad code slightly faster. The gain from a version shows up where time goes on executing PHP, not on waiting for the database or on transfer.

You upgrade PHP mainly for two other reasons: so that vulnerabilities in the interpreter get patched, and so that new plugin versions can be installed at all. Performance here is a side effect, not the goal.

In short

The order: update WordPress and the add-ons, take a backup and verify it restores, review compatibility of the critical plugins, change PHP, clear the cache, test the whole user path, read the log. If something breaks — roll back PHP, not the backup.

Today's target is 8.4 or 8.5. On 8.2 there are a few weeks left, and on 8.1 and 7.4 there is nothing left at all.

Not working out?

If the problem stays, or you would rather not experiment on a live site, write to us and we will look at it. The diagnosis costs nothing.

WordPress support

Other guides

A study of 1,003 WordPress sites

A Polish agency scanned 1,003 sites and published its method. The figure most often quoted from the study is misleading, and the most interesting one sits in the middle of the text: for 86% of vulnerable plugins a fix already existed.

Property developer websites and the draft 2027 rules

The amendment to the Developer Act and Portal DOM are not in force - they are a draft and an announcement. Even so, one decision when commissioning a website is shared by every version of them, and taken later it costs many times more.

The LiteSpeed Cache vulnerabilities

Two vulnerabilities, two products sharing a name, and two different categories of risk. In both cases applying the patch does not close the case - once because of what stayed in the cache, once because of who stayed in the system.

FrankenPHP and Laravel: API performance

Worker mode removes the cost of booting Laravel from every request - and nothing more. Whether that is a lot depends on what share of your response time that cost is. It is arithmetic on your own measurements, not a benchmark from a blog.

Filament: an admin panel for Laravel applications

The admin panel is the part of a system your customers never see and your own people spend eight hours a day in. Filament shortens the road to building one - provided you know what it does not do.

Drupal 10 reaches end of life

Drupal 10 stops receiving security fixes on 9 December 2026. If your site runs on it, you have weeks left to decide - and the cost depends mostly on which version you are starting from.

Getting started with AI in your company

Most failed AI projects do not fall over on the technology, but on the choice of process. So we start with what is countable and repetitive, not with what looks most impressive.

A slow website

A slow site is never one fault, it is the sum of several. We start by measuring, because without that optimisation is guesswork - and usually speeds up what was already fast.

An expired SSL certificate

Instead of your site, visitors get a red warning and have to click through "proceed anyway". Most of these cases are an expired certificate or a renewal that never finished.

Moving a website to new hosting

A migration goes well or badly depending on the order of the steps. The most expensive mistake is switching DNS before checking that the site works on the new server at all.

WordPress redirecting to spam sites

Visitors land on somebody else's site, and Google shows spam where your offer used to be. That is a break-in, not a fault - and cleaning the files alone will not hold.

The WordPress 500 error

HTTP 500 is the server saying something interrupted the code. On its own it tells you nothing - the whole job is getting to the log.

The WordPress white screen

Instead of your site you get blank white. It is one of the most common symptoms, and in most cases it can be defused in a quarter of an hour.