Key takeaways
- PHP is the language WordPress runs on, and it is upgraded on your hosting account rather than inside WordPress.
- Check your current version in Site Health, update WordPress, plugins and theme first, then test the new version on staging.
- Switch in the hosting control panel, test key pages, forms and checkout straight away, and keep the old version noted in case you need to roll back.
To update the PHP version for a WordPress site, check your current version in Tools, then Site Health, update WordPress, your plugins and theme, test the new PHP version on a staging copy, then switch it in your hosting control panel. PHP runs on the server, so the change happens in your hosting account rather than inside WordPress itself.
This guide is for UK small business owners who have seen a warning about an outdated PHP version in the dashboard or an email from their host. It explains why PHP matters, how to prepare, how to make the switch and what to do if something breaks.
What PHP is and why the version matters
PHP is the programming language WordPress, its plugins and most themes are written in. Your web server runs a particular version of PHP, and every page request uses it. Like any software, PHP versions have a lifespan. Each version receives active development for a period, then security fixes only, and then nothing at all.
Running an old, unsupported version has three costs:
- Security. Unsupported versions stop receiving security fixes, so newly discovered problems stay open.
- Compatibility. Plugin and theme developers gradually stop supporting old versions, so updates may no longer install or may stop working.
- Performance. Newer PHP versions have generally been faster and more efficient, which helps page speed. Our guide to website speed optimisation covers the other factors.
The official PHP project publishes which versions are supported and until when, and WordPress publishes its recommended version. Check both for current details, as they change over time.
Check which PHP version you are running
The quickest way is the WordPress Site Health screen. Go to Tools, then Site Health. If your PHP version is outdated, the Status tab normally flags it. The Info tab, under Server, shows the exact version.
Your hosting control panel will also show the version, usually in a section called something like PHP settings, PHP version or select PHP version. Some hosts allow a different version for each website or folder, so make sure you are looking at the right site.
Before you upgrade: prepare properly
Most PHP upgrades go smoothly. The ones that do not usually involve an old plugin, an abandoned theme or custom code written years ago. A little preparation catches those before they reach your customers.
- Take a full backup of files and database. Our website backup and recovery plan guide covers what a complete backup includes.
- Update WordPress core to the latest version.
- Update every plugin and theme. Developers often release compatibility fixes ahead of new PHP versions.
- Remove what you do not use. Deactivated plugins and unused themes can still cause problems and are worth deleting. Our WordPress plugin audit guide helps you decide what stays.
- Check plugin compatibility. Look at each plugin's listing or changelog for its tested and required PHP versions. Be wary of anything not updated in a long time.
- Find custom code. Note any custom theme, child theme or code snippets. These are the most likely to use older PHP features and are not covered by plugin updates.
How to update the PHP version for WordPress
The exact screens vary between hosts, but the process is broadly the same.
- Create or refresh a staging site. Many hosts offer one-click staging. Set staging to the new PHP version first. See our guide to website staging and testing.
- Test the staging site thoroughly. Browse the main templates, submit forms, log in and out, and run a test order if you sell online. Check the error log for warnings.
- Fix or replace anything that fails. Update, replace or remove problem plugins, and ask a developer to update custom code.
- Choose a quiet time for the live change, such as early morning or a weekday evening, when few customers are on the site.
- Note your current version so you know exactly what to roll back to.
- Switch the live site in your hosting control panel. The change usually applies within a minute or two.
- Test the live site immediately, using the same checklist as staging.
- Clear caches from any caching plugin, server cache and content delivery network.
If your hosting panel only offers old PHP versions, or no option to change it, contact the host. If they cannot offer a current, supported version, that is a strong sign it is time to move. Our guides to WordPress hosting in the UK and how to change website hosting without downtime cover what to look for and how to move safely.
A testing checklist for after the switch
| Area | What to check |
|---|---|
| Front end | Homepage, a service page, a blog post, the contact page and any landing pages |
| Forms | Every form submits, shows a confirmation and sends its notification email |
| Shop | Product pages, basket, checkout, payment and order emails |
| Dashboard | Log in, edit and save a page, upload an image, open plugin settings |
| Integrations | Booking systems, newsletter sign-ups, analytics and any connected tools |
| Error log | No new fatal errors or repeated warnings in the hosting error log |
Check again the next day too. Some features, such as scheduled tasks, backups or automated emails, only run at certain times.
What to do if something breaks
If the site shows "There has been a critical error on this website" or a feature stops working after the switch, you have two choices. The fast one is to switch PHP back to the previous version in your hosting panel, which normally restores things within minutes. Then investigate on staging without customers watching.
The error log will usually name the file that failed, which points to the plugin, theme or snippet involved. Update it, replace it or have the custom code rewritten, then try the upgrade again. Treat rolling back as a short pause, not a solution, because the older version will eventually lose security support.
If you cannot reach the dashboard at all, rolling back in the hosting panel is still possible, because it does not depend on WordPress loading. If you do not have access to the hosting account, contact whoever does, or your host's support team, and ask them to restore the previous version while you investigate.
Keeping PHP current in future
- Put PHP on your maintenance list. Check the version a few times a year as part of routine website maintenance.
- Read your host's emails. Hosts usually announce when they plan to retire old versions. Ignoring those notices can mean the host upgrades you without testing.
- Keep plugins lean and maintained. Well-supported plugins make PHP upgrades routine.
- Keep custom code documented. Knowing where custom code lives makes testing faster each time.
- Keep staging available. A staging copy that is refreshed from the live site every so often makes each future upgrade a quick test rather than a project.
- Know who holds the hosting login. Many upgrade delays happen because nobody can find the hosting account details. Store them securely and make sure more than one trusted person can access them.
When to get help
If your site has a lot of custom code, a complex shop or an old theme nobody has touched for years, a developer can review compatibility before you switch and fix what needs fixing. At Prism Works Studio we handle PHP upgrades, hosting moves and ongoing updates as part of our website and ecommerce development work. Our pricing page sets out how projects and support retainers are structured.
FAQs
How do I update the PHP version for WordPress?
Back up the site, update WordPress, plugins and theme, then test the new PHP version on a staging copy. When it passes, switch the version in your hosting control panel and test the live site straight away.
Can I update PHP from the WordPress dashboard?
Usually not. PHP runs on the server, so the version is changed in your hosting control panel. Some managed WordPress hosts add a shortcut, but the change still happens at hosting level.
Will updating PHP break my website?
Most well-maintained sites upgrade without problems. Breakages usually come from old plugins, abandoned themes or custom code. Testing on staging first and keeping a backup makes the risk small and easy to reverse.
Which PHP version should my WordPress site use?
Use a version that is still supported by the PHP project and recommended by WordPress, and that your plugins and theme support. Check both official sources for current recommendations, as they change regularly.
How do I check my current PHP version?
Go to Tools, then Site Health, then the Info tab and open the Server section. Your hosting control panel will also show it, usually in its PHP settings area.
Can I switch back if the new PHP version causes problems?
Yes, most hosts let you choose the previous version again in the control panel. Treat it as a temporary fix while you update or replace whatever failed, because older versions eventually lose security support.