If your website runs on WordPress, a shop platform or almost any other content management system, it almost certainly runs on PHP. Most site owners never think about which version until a plugin complains, a host sends a warning, or something stops working.
Upgrading PHP is one of the simplest ways to keep a site secure and running well. It is also one of the easiest ways to break a site if you rush it. This guide explains why the version matters, how to prepare, and how to switch with a clear way back if needed.
Why your PHP version matters
PHP is the language that builds your pages on the server before they reach a visitor's browser. Like any software, each version is supported for a limited time. After that, it stops getting security fixes.
Running an unsupported version means newly discovered flaws in PHP itself will never be patched on your site. PHP 7.4, for example, stopped receiving security fixes in November 2022, yet plenty of sites still use it. The official PHP website lists which versions are currently supported, and it is worth checking before you choose a target.
There are practical benefits too. Newer versions are generally faster, and current releases of popular plugins and themes increasingly expect a modern PHP version.
What can break, and why
PHP mostly keeps old code working, but each major release tidies up older features. Code that was written years ago, or that hasn't been updated, is the most likely to trip up. Common problems include:
- Removed functions. Some older functions were removed in PHP 8. Code that still calls them stops with a fatal error.
- Stricter handling of types. Things that used to produce a quiet warning can now cause an error, particularly when the wrong kind of value is passed to a function.
- Changed comparisons. The way PHP 8 compares text with numbers changed, which can subtly alter how older code behaves.
- Deprecation notices. Newer versions flag features that will be removed later. These don't break anything yet, but they can fill your logs or appear on screen if error display is switched on.
- Abandoned plugins and themes. If an add-on hasn't been updated in years, it may simply not work on a newer version.
The good news is that most of these problems show up quickly when you test, so they are easy to catch before visitors see them.
A step-by-step upgrade plan
1. Find out what you're running
Your hosting control panel normally shows the PHP version for each site. Many content management systems also display it in their admin area, often on a site health or system information page. Note it down.
2. Check what your software supports
Look up the PHP versions supported by your CMS, your theme and each plugin or extension. The one that supports the oldest maximum version sets your limit. If one essential plugin hasn't been updated for a newer PHP version, look for an alternative before you upgrade.
3. Update everything else first
Bring your CMS core, themes and plugins up to date while still on your current PHP version. Most compatibility fixes arrive through these updates, so this step alone solves many problems. Remove any plugins you no longer use; that's less code to worry about.
4. Take a fresh backup
Back up both your files and your database immediately before the change, and make sure you know how to restore them. A backup you can't restore quickly is not much use at the moment you need it.
5. Test on a copy if you can
The safest approach is a staging copy of the site, set to the new PHP version, where you can click around without affecting real visitors. If that isn't practical for a small site, choose a quiet time for the switch and be ready to change back.
6. Switch, then test the things that matter
Change the version and work through a short checklist straight away:
| Check | What you're looking for |
|---|---|
| Home page and key pages | Pages load fully, with no blank screens or error messages |
| Admin login | You can sign in and edit content |
| Forms | Contact and enquiry forms send successfully |
| Shop checkout | Products add to the basket and a test order completes |
| Error logs | No new fatal errors; note any warnings to fix later |
| Scheduled tasks | Cron jobs and automated emails still run |
7. Keep an eye on it for a few days
Some code only runs occasionally, such as monthly reports or renewal reminders. Check your error logs again over the following days, and ask anyone who uses the admin area to tell you if anything looks odd.
Having a rollback plan
Before you start, decide what you will do if something breaks. In most cases the quickest fix is to switch the site back to its previous PHP version, which buys you time to investigate properly.
If the site's data changed while it was misbehaving, for example a plugin wrote corrupted settings to the database, you may need to restore from the backup you took in step 4. That's exactly why it should be taken immediately before the change.
Mistakes worth avoiding
- Changing several things at once. If you're also moving host or redesigning the site, do the PHP upgrade separately. Our guide to moving your website without downtime recommends the same thing: move first, improve second.
- Showing errors to visitors. Log errors to a file rather than displaying them on the page, which can look alarming and reveal details about your site.
- Ignoring deprecation notices. They are a free warning about what will break in the next upgrade. Fix them while there's no pressure.
- Leaving it for years. Small, regular upgrades are far easier than one big jump from a very old version.
How TDesk makes this easier
On TDesk, you can run PHP 7.4, 8.1, 8.2 or 8.3, switchable per site from the panel. Because the setting is per site, upgrading one website doesn't affect any others on your account, and switching back is just as quick if you need to roll back. Each customer gets their own PHP-FPM pool with tunable limits, running under a dedicated Linux user.
For your safety net, encrypted daily backups are kept for 30 days, with one-click restore of files, mailboxes, databases or full sites. MySQL and PostgreSQL databases come with browser-based admin, and a browser file manager plus per-account SFTP make it easy to check files or update configuration. You can see everything included on the features page.
Keep your site current with TDesk Hosting
TDesk Hosting is £4 per website a month (excluding VAT), with the panel, server, bandwidth, email, DNS, SSL, databases and daily backups included. There are no setup fees or contracts, and you can cancel anytime. A Transcom account is free to open. See TDesk pricing and get started.