Troubleshooting · Troubleshooting
How to Fix a Site Broken After a PHP Update in WordPress
Short answer
Roll back to the PHP version that worked before the update, then find the plugin or theme named in the error log. Update that plugin or theme, replace it if no update fixes it, and test the new PHP version on a staging copy before you switch the live site again. WordPress.org recommends PHP 8.3 or greater as of November 2026.
Key takeaways
- A PHP update changes the language WordPress runs on, so old plugin or theme code can stop working at once.
- WordPress.org recommends PHP 8.3 or greater as of November 2026, while PHP 7.4 still works but has reached end of life.
- PHP 8.2 stops getting security fixes on 31 December 2026, so it is not a safe long-term fallback.
- The error log names the file and line at fault, which points to the plugin or theme you need to update or replace.
- Test every PHP change on a staging copy first, then switch the live site and check the home page, login page and checkout.
- If you cannot reach wp-admin or change the PHP version yourself, ask your host to roll the version back.
What does a site broken after a PHP update mean?
It means your site stopped loading, or lost pages and features, right after the PHP version on the server changed.
PHP is the programming language WordPress runs on, and your host sets the version that serves your site. A PHP update does not change your posts, media or database. It changes how the server reads the code in WordPress core, your theme and your plugins.
The break often looks like a white screen, a 500 error, or a short fatal error message. Some sites load the home page but fail on login, checkout or a single plugin page.
Why does a PHP version change break a WordPress site?
It breaks a site when a plugin, theme or custom code uses a function, syntax or behaviour that the new PHP version removed or changed.
PHP 8.0 removed create_function() and each(), made match a reserved word, and removed curly-brace array access such as $array{0}, according to the PHP 8.0 migration guide. Code that still uses those items fails at once on PHP 8.0 or newer.
PHP 8.0 also turned several warnings into Error exceptions, including undefined constants and invalid types passed to count(), and the @ operator no longer silences fatal errors, according to the same PHP 8.0 migration guide.
PHP 8.4 added its own deprecations. It deprecated implicitly nullable parameters, the E_STRICT constant, a class named _, and the xml_set_object() function, according to the PHP 8.4 migration guide. Deprecated code still runs in most cases, but it fills the log and warns that removal is coming.
| PHP change | What breaks | First seen |
|---|---|---|
create_function() removed | Old plugins and themes that build code from strings | PHP 8.0 |
each() removed | Old loops over arrays | PHP 8.0 |
| Curly-brace array access removed | Old code such as $array{0} | PHP 8.0 |
| Implicitly nullable parameters deprecated | Functions written as function foo(T1 $a = null) | PHP 8.4 |
E_STRICT constant deprecated | Code that checks that error level | PHP 8.4 |
WordPress core itself is not the usual cause. WordPress.org recommends PHP 8.3 or greater as of November 2026, and it lists PHP 7.4 as a legacy floor that has reached end of life, on its Requirements page.
A break after a PHP update is far more often a plugin or theme that has not kept up. Learn which versions work together in the WordPress PHP compatibility guide.
How do you find which PHP version your site now runs?
Open Tools, then Site Health, then the Info tab, then the Server section, and read the PHP version line.
Site Health sits in your dashboard under Tools, then Site Health, then Info, according to the Site Health screen guide. The Server section on that tab lists the PHP version, the web server and the PHP limits for your site.
If you cannot reach wp-admin, ask your host or look in your hosting panel. Most panels show the PHP version on the same screen where you change it. Write down the full version, such as 8.3.12, and the version your site ran before the change.
How do you read the error and find the plugin or theme at fault?
Turn on the debug log, reload the broken page once, then open wp-content/debug.log and read the last fatal error lines.
Add these 3 lines to wp-config.php, before the line that says “That's all, stop editing! Happy blogging.”, as shown in the Debugging in WordPress guide:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
WP_DEBUG_LOG saves errors to debug.log in the content folder, usually wp-content/debug.log, and it only works when WP_DEBUG is true, according to the Debugging in WordPress guide. Setting WP_DEBUG_DISPLAY to false hides errors from visitors while you read the log.
The log line names the file, the line number and the error type. A path such as wp-content/plugins/example-plugin/includes/file.php names the plugin.
A path under wp-content/themes/ names the theme. A path under wp-content/mu-plugins/ names a must-use plugin.
Common log phrases and what they point to:
- “Call to undefined function” points to a function the new PHP version removed.
- “Uncaught Error” or “Uncaught TypeError” points to code that now throws an exception instead of a warning.
- “Deprecated” points to code that still runs but needs an update before the next PHP version.
- “Parse error” points to syntax the new PHP version no longer accepts.
How do you roll back to the last working PHP version?
Change the PHP version back in your hosting panel, wait for the change to apply, then reload your site.
You cannot change the PHP version from inside WordPress. The change happens in your hosting panel, in cPanel, in a host dashboard such as MyKinsta, or in Site Tools. Pick the version your site ran before the update, not the oldest version on the list.
On SiteGround, open Site Tools, go to Devs, then PHP Manager, and click the pencil icon next to Change PHP version, according to the SiteGround Managed PHP guide. You can pick Managed PHP, which moves the site to a newer stable version when SiteGround judges it ready, or change the version by hand.
On Kinsta, go to Sites, pick the site, open Tools, and click Change under PHP settings, then pick a version and click Change PHP settings, according to the Kinsta PHP guide. Kinsta says the update usually finishes within 3 minutes and restarts the PHP engine, so the dashboard may pause for a few seconds.
If your panel has no PHP setting, ask your host to set the version for you. Give them the exact version you need, such as 8.2, and the time the site broke. A rollback is a short-term fix, not a final answer, because old PHP versions stop getting security fixes.
| PHP branch | Security support ends | Status as of November 2026 |
|---|---|---|
| 8.2 | 31 December 2026 | Security fixes only |
| 8.3 | 31 December 2027 | Security fixes only |
| 8.4 | 31 December 2028 | Active support until 31 December 2026 |
| 8.5 | 31 December 2029 | Active support until 31 December 2027 |
PHP gives each branch 2 years of active support and 2 more years of security fixes only, according to the PHP supported versions page. PHP 8.5 was first released on 20 November 2025, and PHP 8.6 was first released on 19 November 2026, according to the same page.
Pick a version that still gets security fixes. The steps for a planned move are in the guide to updating PHP in WordPress.
How do you fix the site on the new PHP version step by step?
Update the faulty plugin or theme first, test the site, and only then switch PHP forward again.
Follow these steps in order:
- Take a full backup of files and database before you change anything.
- Roll PHP back to the last working version so you can reach wp-admin.
- Go to Dashboard, then Updates, and update WordPress core, the faulty plugin or theme, and every other plugin with an update.
- Check the changelog of the faulty plugin or theme for a PHP 8 fix, and read its “Requires PHP” line on its WordPress.org page.
- If no update fixes it, deactivate that plugin or switch to a default theme such as Twenty Twenty-Five, then reload the site.
- If the site loads without it, replace the plugin or theme with one that states support for your target PHP version.
- Switch PHP forward again on a staging copy first, then on the live site.
If wp-admin is locked, deactivate plugins from the files. WordPress.org says you can rename the plugins folder to plugins.hold by FTP or file manager, in its FAQ Troubleshooting guide.
Log in, rename it back to plugins, and reactivate plugins one by one. That method keeps plugin settings but leaves every plugin off until you turn it back on.
How do you check plugin and theme compatibility before you switch again?
Check 3 facts for each plugin and theme: its “Requires PHP” line, its last update date, and whether its author lists your target PHP version.
“Requires PHP” is the lowest PHP version the plugin needs, not the highest version it works with. A plugin that requires PHP 7.4 may still fail on PHP 8.4 if its code uses a removed function. Look for a changelog note that names PHP 8.3 or 8.4 support.
For a plugin from WordPress.org, open its plugin page and check the last updated date and the tested-up-to WordPress version. A plugin with no update for over a year is a risk on a new PHP version, even if it ran fine on the old one.
For a premium plugin or theme, open the vendor's own changelog or support page. Only the vendor can confirm support for a new PHP version, and a support ticket is the right route when the changelog is silent.
For custom code, ask the developer who wrote it to check the PHP migration guides for your target version. The PHP 8.0 and 8.4 migration guides list every removed and deprecated item, so a developer can search the code for those exact items. See which version fits your site in the which PHP version guide.
How do you know the fix worked?
Load the home page, log in to wp-admin, and test the pages and forms that broke, with no fatal errors in the debug log.
Check these items after the switch:
- The home page loads without a white screen or 500 error.
- You can log in and open Dashboard, Plugins and Settings.
- The pages that failed before now load, including checkout, contact forms and search.
- Site Health under Tools shows no critical PHP issue.
wp-content/debug.logshows no new fatal error after you load each key page.
Clear the cache before you judge the result, then reload in a private browser window.
When should you contact your host instead of fixing it yourself?
Contact your host when you cannot reach wp-admin or the hosting panel, when the PHP version will not change, or when the error names a server file.
Ask the host for help in these cases:
- The PHP version setting is missing or greyed out in your panel.
- You changed the version, waited, and the site still reports the old version.
- The error log names a file outside
wp-content, such as a server config or PHP extension file. - The site shows a 500 or 503 error on every page, even with all plugins off.
- You need a backup restored and you cannot reach the backup tool.
Give the host 4 facts: the PHP version before the change, the version now, the exact error line from the log, and the time the site broke. Those facts let support check the server log and the PHP setting without guessing.
If the host sets one PHP version per account, ask which versions they offer and whether a staging copy can run a different version. The WordPress PHP 8.4 support guide shows how core support and host support can differ.
What mistakes should you avoid?
Do not jump to the newest PHP version on the live site, do not edit plugin files to patch them, and do not leave debug mode on.
- Do not switch PHP on the live site without a backup and a staging test.
- Do not pick the oldest PHP version as a long-term fix, since old branches stop getting security fixes.
- Do not edit a plugin or theme file to silence an error, since the next update will overwrite your edit.
- Do not leave
WP_DEBUGset to true on a live site, since errors can show to visitors. - Do not update PHP and WordPress core at the same time, since you will not know which change caused a new error.
- Do not ignore deprecation notices, since a deprecated function in PHP 8.4 may be removed in a later version.
Frequently asked questions
Can I just stay on the old PHP version forever?
No. Each PHP branch gets 2 years of active support and 2 more years of security fixes only, then it reaches end of life and gets no fixes. PHP 8.2 stops getting security fixes on 31 December 2026. Staying on an old version leaves known security gaps open, so use the rollback only while you update or replace the faulty plugin or theme.
Why did my site break if I did not change anything?
Your host may have changed the PHP version for you. Some hosts move sites to a newer PHP version on a set schedule, and SiteGround calls its version Managed PHP. The change can happen overnight, so a site that worked on Friday can fail on Monday with no change from you. Check Site Health to see the current version.
Does a PHP update change my WordPress version?
No. PHP and WordPress are separate. PHP is the language on the server, and WordPress is the software written in that language. A PHP update does not update WordPress core, plugins or themes. You still need to update those separately, and a WordPress core update does not change your PHP version.
Should I update PHP or WordPress first?
Update WordPress core, plugins and themes first while you are still on the working PHP version. That gives the faulty code its best chance of a fix before you move PHP forward. Then test the new PHP version on a staging copy. Never change both on the live site at the same time, since you will not know which change caused a new error.
What if the error names my theme instead of a plugin?
Update the theme first, then switch to a default theme such as Twenty Twenty-Five to test. If the site loads on the default theme, the fault sits in your theme or its child theme. Ask the theme author for a PHP 8 fix, or move to a theme that states support for your target PHP version. Do not edit the theme files to patch the error.
Is PHP 8.4 safe for WordPress as of November 2026?
WordPress.org recommends PHP 8.3 or greater, and PHP 8.4 is inside that range. Safety still depends on your plugins and theme, not on core alone. Check each plugin and theme for PHP 8.4 support, test the switch on a staging copy, and watch the debug log after the change. If one plugin fails, roll back and fix that plugin first.
Sources
- Requirements WordPress.org
- PHP: Supported Versions PHP.net
- Debugging in WordPress WordPress Developer Resources
- Site Health screen WordPress.org
- PHP 8.0 Backward Incompatible Changes PHP.net
- PHP 8.4 Deprecated Features PHP.net
- What is Managed PHP service? SiteGround
- Restart and Update PHP Kinsta
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
