Skip to content

Cookie settings

Choose which kinds of cookies you allow. You can change your choice at any time via Cookie settings at the bottom of every page. Privacy statement

Necessary

Always on

Needed to log in, keep your cart and remember your choices. These are always on.

Which cookies?
  • weboke_sessie, weboke_klant, weboke_remember: your session and staying logged in
  • weboke_basket: your cart
  • wkBtwIncl: showing prices with or without VAT
  • wok_cookies: your cookie choice, 12 months

Measures which ad leads to a visit or order, so we do not pay for ads that do nothing.

Which cookies?
  • Google Ads via Google Tag Manager (_gcl_au, _gcl_aw), up to 90 days
  • OpenAI Ads, ads in ChatGPT
  • wok_aff: which partner referred you to us (affiliate programme), 60 days

4.6

Country and language

Each country has its own site, with prices and VAT for that country.

View

Module 8 · 8.4

PHP versions and upgrades

Module 8: Backups, staging and PHP upgrades · Reading time: 10 minutes

Learning objective: After this lesson you'll be able to safely prepare, carry out and, if necessary, roll back a PHP upgrade.

Key concepts: PHP lifecycle (active support, security only, end of life), compatibility of WordPress, theme and plugins, deprecated, warning, fatal error, Site Health, error log, staging, restore, having an upgrade done for you

Why PHP versions matter

WordPress, your theme and your plugins are written in PHP (lesson 1.2). A new version of PHP is released every year (8.3, 8.4, 8.5, ...). Each version is maintained for a fixed period:

  • active support: two years of bug and security fixes;
  • security only: a further two years of security fixes only;
  • end of life: no more fixes, not even for vulnerabilities.

The situation on 8 November 2026, according to php.net:

VersionSecurity updates untilStatus
8.1 and older(past)No more updates
8.231 December 2026Security only, nearly at end of life
8.331 December 2027Security only
8.431 December 2028Active
8.531 December 2029Active

A website running on a version with no updates runs on software with known vulnerabilities that no longer get fixed. Newer versions are also noticeably faster (lesson 6.3). And wordpress.org recommends PHP 8.3 or higher (as of November 2026). So the idea is to keep up every year, not to make one big jump every five years.

Why an upgrade can break things

Every new PHP version changes something. Functions that have been marked as deprecated for years get removed, and rules become stricter. A few well-known examples:

  • PHP 8.0 removed create_function() and each(), among others, and many warnings became errors;
  • PHP 8.2 marked dynamically creating properties on objects as deprecated, which is common in older plugins.

There are three kinds of messages, and the difference matters:

MessageMeaningEffect
Deprecated"This still works, but will be removed in a future version"Nothing visible; a warning for the future
Warning or NoticeSomething isn't quite rightUsually nothing visible, occasionally a component behaves oddly
Fatal errorPHP stopsA blank page or "critical error" (lesson 5.4)

WordPress itself usually keeps up well with new PHP versions. The risk lies in old plugins and themes, especially if they haven't been updated in a long time or are custom-built.

Finding your current version

  • In WordPress: Tools > Site Health, Info tab, under Server: the PHP version. Site Health also warns you if your version is outdated.
  • In your hosting panel: in DirectAdmin with CloudLinux, under Select PHP version (with "(current)" after the current version).
  • Sometimes the server reveals it in the X-Powered-By: PHP/8.3.x header. Better not to have this visible (lesson 7.4), but if it's there, it's quick to check.

Note: with many hosts, the PHP version applies to your whole package, meaning all websites within it. An old website in the same package can hold you back. That's another reason to clean up old websites or give them their own package.

The upgrade: step by step

  1. Update first. Update WordPress, your theme and all your plugins on the current PHP version. This already resolves a large share of problems, because developers adjust their code for new PHP versions.
  2. Check what your plugins say. The wordpress.org plugin page states the required PHP version; the changelog often says "compatible with PHP 8.x". A plugin that hasn't been updated in years (lesson 5.3) is a candidate for replacement.
  3. Make a backup (lesson 8.1).
  4. Test on staging (lesson 8.3). If your host can give you a different PHP version per website, set the staging site to the new version. If that's not possible (one version per package), test on a staging site in a different package, locally, or choose a quiet moment on production with the old version ready to restore.
  5. Switching over: choose the new version in your panel. In DirectAdmin with CloudLinux, choose it under Select PHP version and click Apply; without Apply, nothing changes.
  6. Check immediately: open your website and click through a few pages, including the dashboard, a form and (for a shop) the checkout. Check the error log (lesson 5.4) for new PHP Fatal error lines.
  7. Extensions and settings: with some hosts, PHP extensions and options (such as memory_limit) belong to a specific version. After switching, check that they're set correctly for the new version.

If something goes wrong

  • Fatal error: restore the old version (possible immediately with most hosts), so your website works again. Find out in the error log which plugin or theme was the cause (the path is in the error message), update it, replace it, or ask the developer for a fix. Then try again.
  • Only deprecated messages: no reason to go back. But it's a warning: in the next version it might become an error. Note down which plugin it is.
  • Custom code that no longer works: an old website built by a web developer may contain code that nobody maintains any more. That code then needs to be adjusted by someone who knows PHP. Some hosts, including WebOké, offer to do this for you.

Don't leave a website on an old version "forever" because one plugin can't keep up. That just postpones a problem that grows bigger every year.

More certainty in advance

For those who want to go further: with PHP_CodeSniffer and the rules from PHPCompatibilityWP, you can have the code of your plugins and themes checked for things that won't work in a newer PHP version, without running the website. This finds a lot, but not everything. Testing on staging remains necessary.

In practice: what it looks like in a panel

As an example, we use DirectAdmin with CloudLinux. In cPanel it's often called MultiPHP Manager or Select PHP Version, in Plesk, PHP Settings.

  1. Open Select PHP version (under Extra Features).
  2. Click the version under PHP version, choose the new version and click Apply.
  3. Check the Extensions and Options tabs for the new version.
  4. Check your website and the error log. If something doesn't work, choose the old version and Apply.

Summary

  • Every PHP version gets two years of active support and two years of security only; after that, no more fixes. On 8 November 2026, 8.1 gets nothing more, and 8.2 gets updates until the end of 2026.
  • An upgrade mainly breaks old plugins and themes; deprecated is a warning, a fatal error stops the website.
  • Order of steps: update everything, check plugins, make a backup, test on staging, switch over, check immediately.
  • If something goes wrong, restore the old version, find the culprit in the error log and fix it; don't get stuck on an old version.
  • With many hosts, the version applies to the whole package; clean up old websites.

Quiz

1. What does it mean when a PHP version becomes "security only"?



2. After a PHP upgrade, the error log only shows "Deprecated" messages. What do you do?



3. What's the correct order for a PHP upgrade?



4. You have two websites in one package. The new one supports PHP 8.4, the old one stops working above PHP 7.4. What's the problem and the solution?



Exercise

Exercise A8.4: Is your PHP version still supported? Check Tools > Site Health (Info tab, Server) to see which PHP version your website uses, and enter it along with your domain. The tool compares the version against the list of supported versions from php.net: green for active support, orange for security only, red if no more updates are coming. If your server shows the version in the X-Powered-By header, the tool also checks whether it matches what you entered (and lets you know you'd better hide that header, lesson 7.4).

Exercise A8.4: Is your PHP version still supported?



What you enter and what we find isn't stored. Your browser remembers your answers and whether you've passed the exercise. If you're signed in, we only save that you got the exercise (almost) right in My courses; you can delete that there too.

Exercise D8.4: An upgrade plan. Write a plan for upgrading your website to the newest PHP version your host offers. Fill in: current and target version, which plugins and themes you have and whether they support the target version (with where you read that), where you'll test (staging, a different package, locally), how you can roll back, and when you'll do it. Carry it out if you can, and note what appeared in the error log.

Exercise D8.4: An upgrade plan

You do this exercise yourself; no one checks it. Tick off what you've done and mark the exercise as done.



Your ticks and notes only stay in this browser; we don't send them anywhere. If you're signed in, we only save in My courses that you've done the exercise.

Further reading

These articles describe the steps in WebOké's panels; in other panels they work in a similar way.

One moment…

Set up your domains

For each domain, arrange the nameservers, the link to your hosting and who becomes the owner.

Loading your domains…