How to Update the PHP Version in WordPress Safely (2026)
PHP 8.2 reaches end of life on 31 December 2026. How to check your PHP version, which version to choose, how to test and switch safely and what to do if something breaks.

PHP is the language WordPress runs on. Every page your site serves is built by PHP on your server, and the version of PHP your host runs decides how fast that happens, which security fixes your site gets and which plugins will still work. Yet on many sites the PHP version has not been touched since the site was built.
That becomes a problem at the end of 2026. PHP 8.2 stops receiving security fixes on 31 December 2026, and PHP 8.1 and older already receive none. If your site still runs on one of them, it is time to update. This guide explains how to check your current version, which version to choose, how to prepare and test the switch, how to change the version at your host and what to do if something breaks.
Key takeaways
- PHP 8.2 reaches end of life on 31 December 2026. PHP 8.1, 8.0 and every 7.x version no longer get security fixes.
- WordPress recommends PHP 8.3 or newer. For most sites in 2026, PHP 8.4 is the best balance of support and plugin compatibility.
- Check your current version under Tools → Site Health → Info → Server.
- Before switching: full backup, update all plugins and themes, check compatibility, and ideally test on a staging copy.
- Changing the version usually takes one click in your hosting panel, and you can switch back just as quickly if something breaks.
- Most problems come from old plugins, abandoned themes and custom code, not from WordPress core.
Why the PHP version matters
- Security. Once a PHP version reaches end of life, newly discovered vulnerabilities in PHP itself are no longer fixed. Your WordPress and plugins can be fully up to date and your server still runs unpatched code.
- Speed. Each PHP 8 release has brought performance improvements. Moving from an old 7.x version to a current 8.x version often makes pages noticeably faster without any other change.
- Compatibility. Plugin and theme developers drop support for old PHP versions. Sooner or later an update will require a newer PHP version than your server runs, and you can no longer install it.
- Hosting. Hosts phase out old versions. Some move sites to a newer version automatically, which is the worst way to find out about an incompatible plugin.
PHP versions and their support dates
Every PHP version gets two years of active support (bug and security fixes), followed by two years of security fixes only. After that it reaches end of life. Status as of November 2026:
| Version | Status | Security fixes until | Recommendation |
|---|---|---|---|
| 7.4 and older | End of life | Ended | Update now |
| 8.0 | End of life | Ended | Update now |
| 8.1 | End of life | Ended | Update now |
| 8.2 | Security fixes only | 31 December 2026 | Update before the end of the year |
| 8.3 | Security fixes only | 31 December 2027 | Acceptable, minimum recommended by WordPress |
| 8.4 | Active support | 31 December 2028 | Best choice for most sites |
| 8.5 | Active support | 31 December 2029 | Good choice if all your plugins support it |
| 8.6 | Newly released (19 November 2026) | 31 December 2030 | Wait until your key plugins confirm compatibility |
Source: the official supported versions page on php.net and the WordPress requirements.
Which PHP version should you choose?
WordPress itself recommends PHP 8.3 or newer. That is the floor, not the target. Our recommendation for 2026:
- PHP 8.4 for most business sites and shops. It has security support until the end of 2028, and almost every maintained plugin and theme supports it.
- PHP 8.5 if your site uses few plugins, all of them actively maintained, and you want the longest runway.
- PHP 8.3 only as an intermediate step if a plugin you depend on is not ready for 8.4 yet. Plan the next step at the same time.
- Not PHP 8.6 yet. A brand-new version needs a few months before plugins, themes and hosting setups have caught up.
If your site runs on PHP 7.4 or 8.0, do not jump straight to the newest version. Go to 8.3 or 8.4 first, check everything, and continue from there. The bigger the jump, the more can break at once, and the harder it is to tell what caused it.
How to check your current PHP version
- In WordPress, go to Tools → Site Health → Info and open the Server section. The PHP version is listed there.
- Site Health also shows a warning on the Status tab if your PHP version is outdated.
- In your hosting panel, the PHP settings or PHP configuration page shows the active version, and usually the available versions too.
- If you manage several sites, check each one individually. Sites on the same hosting account can run different PHP versions.
Before you switch: preparation
- Create a full backup of files and database, stored outside your server. Our WordPress backup guide explains what a usable backup needs.
- Update everything first: WordPress core, all plugins and your theme. Newer plugin versions are much more likely to support newer PHP.
- Remove what you do not use. Every deactivated plugin and unused theme is code that may not be compatible and that nobody tests.
- Check compatibility. Look at the “Requires PHP” and “Tested up to” information on each plugin page, the changelogs of your most important plugins and any notes from your theme developer.
- Look for abandoned plugins. A plugin without an update in two years is the most likely candidate to break. Find a replacement before you switch, not after.
- Note your custom code: snippets in functions.php, a child theme or a custom plugin. That code is often old and has never been tested on PHP 8.
Test on staging first
A PHP upgrade is one of the changes where a staging copy really pays off, because the change affects every page and every plugin at once. The process:
- Create or refresh a staging copy of your site.
- Switch the staging copy to the new PHP version (most hosts let you set it per site or per subdomain).
- Enable logging on staging: set
WP_DEBUGandWP_DEBUG_LOGto true in wp-config.php so warnings are written to wp-content/debug.log. - Click through every important page type: home page, landing pages, blog posts, contact form, shop, cart and checkout, member area.
- Test forms and place a test order or booking.
- Check the admin area too: editor, page builder, settings pages of your main plugins.
- Read debug.log. Fatal errors must be fixed. Deprecation notices are a warning for the next upgrade.
- Fix or replace what breaks, then repeat until the log is clean.
Our guide to WordPress staging explains how to set up the copy and which settings prevent emails and payments from leaving it.
How to change the PHP version at your host
PHP runs on the server, so you change it in your hosting panel, not in WordPress. The exact wording differs, but the steps are similar everywhere:
| Hosting panel | Where to find it |
|---|---|
| Hostinger (hPanel) | Websites → your site → Advanced → PHP Configuration → PHP version |
| cPanel | Software → Select PHP Version or MultiPHP Manager |
| Plesk | Websites and Domains → your domain → PHP Settings / PHP version |
| Managed WordPress hosts (for example Kinsta, WP Engine, SiteGround) | Site settings or Tools section of the site in the dashboard |
| Your own server or VPS | Install the new PHP version and switch the web server or PHP-FPM configuration; ask your administrator |
After switching, clear every cache (plugin cache, server cache, CDN) and check the site straight away, starting with the pages that make you money.
What usually breaks, and why
| Symptom | Typical cause | What to do |
|---|---|---|
| “There has been a critical error on this website” | A plugin or theme uses functions that were removed in the new PHP version | Check the recovery mode email WordPress sends to the admin address, or the debug log, to see which plugin it is |
| White page without any message | Fatal error with error display turned off | Enable WP_DEBUG_LOG and read the log, or switch PHP back |
| Layout or a single section missing | A page builder add-on or shortcode plugin fails | Update or replace the add-on |
| Warnings or “Deprecated” text on the page | Old code that still works but uses outdated features | Turn off error display on live sites, plan to update the code |
| Checkout or payment errors | Outdated payment gateway or WooCommerce extension | Update the extension, test a payment in test mode |
If something breaks: roll back
The good news: a PHP switch is easy to undo. If the live site shows errors after the switch, set the PHP version back to the previous one in your hosting panel, clear caches and check the site again. That usually takes a minute and restores the old state without touching your content.
Then find the cause in peace, on staging. Do not leave the site on the old version for months, though. Rolling back buys time, it does not solve the problem, and the end-of-life date does not move.
PHP upgrades across many sites
For an agency with dozens of client sites, the end of PHP 8.2 means dozens of upgrades in the same few weeks. The efficient approach: group sites by the plugins and themes they share, test each group once on staging, then switch the sites of that group with a backup before and a visual check after each switch. Sites with abandoned plugins or old custom code get handled individually. Our agency offer and the fleet-wide update work exactly this way.
Let us handle your PHP upgrade.We back up your site, test the new PHP version on a staging copy, fix or replace incompatible plugins and switch your live site once everything works. From 199 euros per site.
PHP upgrade service →PHP upgrade checklist
- Current PHP version checked under Site Health
- Target version chosen (usually PHP 8.4)
- Full backup stored outside the server
- WordPress, plugins and theme updated
- Unused plugins and themes removed
- Abandoned plugins replaced
- New version tested on staging with debug log enabled
- Important pages, forms and checkout tested
- Live site switched and caches cleared
- Live site checked again, rollback plan ready
Sources and further reading
- Supported PHP versions, php.net
- WordPress requirements, WordPress.org
- Debugging in WordPress, Advanced Administration Handbook
- Updating WordPress, WordPress.org documentation
Frequently asked questions
How do I update the PHP version in WordPress?
You change the PHP version in your hosting panel, not in WordPress itself. Make a full backup, update WordPress, plugins and theme, test the new version on a staging copy, then select the new PHP version for your site in the hosting panel and clear all caches.
Which PHP version should I use for WordPress in 2026?
WordPress recommends PHP 8.3 or newer. For most sites, PHP 8.4 is the best choice in 2026: it receives security fixes until the end of 2028 and is supported by almost all maintained plugins and themes.
When does PHP 8.2 reach end of life?
PHP 8.2 receives security fixes until 31 December 2026. After that date, vulnerabilities in PHP 8.2 are no longer fixed, so sites running it should be updated before the end of the year.
Can updating PHP break my WordPress site?
Yes, if a plugin, theme or custom code uses features that were removed in the new version. That is why you should test on staging first. If the live site breaks, you can switch back to the previous PHP version in your hosting panel within minutes.
How do I check which PHP version my site uses?
In WordPress, go to Tools → Site Health → Info and open the Server section. Your hosting panel also shows the active PHP version.
Does a newer PHP version make WordPress faster?
Usually yes. Each PHP 8 release has improved performance, and sites moving from PHP 7.x to a current 8.x version often load noticeably faster without any other change.
How do I undo a PHP update?
Select the previous PHP version again in your hosting panel and clear all caches. Your content is not affected, because the PHP version only changes how the server runs the code.
Conclusion
Updating PHP is one of the most effective things you can do for the security and speed of a WordPress site, and with PHP 8.2 reaching end of life on 31 December 2026, it is due for many sites now. Back up, update everything, test the new version on staging and switch when the log is clean. Aim for PHP 8.4, and keep the old version as an easy way back while you check the live site.
Keep your WordPress site current without the work.A backup before every update, updates in the right order, a visual check of every page and a clear monthly report. Try WP Beekeeper free for 14 days, no credit card needed.
Start free trial →

