Why update PHP at all

PHP is the language WordPress runs on, and each version gets security fixes for a fixed time. After that, holes found in PHP itself stay open. PHP’s own supported versions page lists the dates. As of 21 November 2026:

PHP version Security fixes until
8.1 and older Ended (8.1 on 31 December 2025)
8.2 31 December 2026
8.3 31 December 2027
8.4 31 December 2028
8.5 31 December 2029
8.6 31 December 2030

WordPress itself recommends PHP 8.3 or newer on its requirements page, shows a “PHP Update Recommended” box on the dashboard of sites on old versions, and explains the upgrade for site owners on its update PHP page. Newer PHP versions are also generally faster for WordPress.

Step 1: find the PHP version the site really runs

In wp-admin, go to Tools, Site Health, Info and open Server. “PHP version” is the version the web server uses for this site, which is the one that matters.

Be careful with the command line. wp --info and php -v show the PHP that runs on the command line, which on many servers is a different version from the one serving the website. Trust Site Health or the hosting panel.

Step 2: check that the site’s code supports the new version

  • Plugins and themes from WordPress.org list “Requires PHP”, but that is a minimum, not a maximum. Check each one’s last release date and changelog for mentions of the PHP version you are moving to. A plugin without a release in two years is the first suspect.
  • Premium plugins may be encoded (ionCube is common) and need a loader built for the new PHP version. The vendor’s documentation says which versions it supports.
  • Custom code in the theme’s functions.php, must-use plugins and old snippets is where most surprises live. PHP 8.0 removed functions old code relied on, such as create_function() and each(), and turned many warnings into errors; PHP’s 8.0 migration guide lists them.
  • A code scanner helps on custom code: PHPCompatibility, a ruleset for PHP_CodeSniffer, reports code that will not run on a given version.
phpcs -p wp-content/themes/harbour-child --standard=PHPCompatibilityWP --runtime-set testVersion 8.3-

It reads the code without running it, so it catches removed functions but not every change in behavior.

Step 3: test on a staging copy

If the host offers staging, make a copy, switch the copy’s PHP version, and turn on error logging in the copy’s wp-config.php:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Errors go to wp-content/debug.log instead of the screen. Then walk the site: the home page, a few inner pages, forms (submit one), the cart and checkout on a shop, wp-admin screens the client uses, and anything that runs on a schedule. Read debug.log afterwards. Deprecation notices are warnings for the future; fatal errors are what break the site.

If the site is several versions behind, step the copy through them one at a time (8.1, then 8.2, then 8.3) so you can see which version breaks what.

Step 4: switch PHP on the live site

Make sure a fresh backup exists first (how to back up a WordPress site), and write down the exact version the site runs now, so you know what to switch back to. Then, in a quiet hour:

  • cPanel: open MultiPHP Manager, tick the domain, choose the version and click Apply.
  • Plesk: open the domain, then PHP (PHP Settings), and choose the version.
  • Managed WordPress hosts: look for the PHP version in the site’s tools or settings page; menu names change, so the host’s help pages have the current path.

On some hosts, Cloudways among them, the PHP version is set for the whole server, so every site on that server changes at once. Test them all, or move the sites that cannot change yet.

Step 5: check the site after the switch

  1. Site Health shows the new version under Info, Server.
  2. Load the key pages in a private window: home, contact (send a test), checkout, and log in to wp-admin.
  3. Read the error log: the host’s PHP error log, or wp-content/debug.log if logging is on.
  4. Check PHP extensions. Extensions are often enabled per PHP version, so imagick, intl or others turned on for the old version may be off for the new one. Site Health’s status tab warns about missing required and recommended modules.
  5. Check custom PHP settings. Memory limit, upload size and time limits set in the panel are sometimes kept per version. Make sure they carried over.
  6. Server cron jobs that call php directly may use a different binary from the website. Check they still run.

What can go wrong, and how to undo it

  • “There has been a critical error on this website”. A plugin or the theme cannot run on the new version. Switch back to the previous version in the panel first, so visitors get the site back. Then find the file in the error log, update or replace that plugin, and try again.
  • Warnings printed on pages. display_errors is on in the new version’s settings. Turn it off in the panel, or set WP_DEBUG_DISPLAY to false.
  • Images stop resizing or uploads fail. A missing extension (usually imagick or gd) on the new version.
  • Everything works, but slowly. OPcache settings differ per version on some hosts; ask the host to check it is on.
  • Something fails quietly a day later. Scheduled jobs (emails, feeds, backups run by a plugin, imports) only run when WP-Cron fires. Check the next morning that the site’s scheduled emails went out and its plugin logs show no new errors.

Switching back is the undo for all of these, and it is quick. That is why you do this in a quiet hour with the panel open.

How to explain it to the client

Clients do not see PHP, so explain it in terms of security and support dates:

The site runs on PHP 8.2, which stops getting security fixes on 31 December. We tested the site on PHP 8.4 on a copy, updated one plugin that needed it, and switched the live site on Thursday evening. Nothing you see has changed.

If a plugin blocks the move, tell the client which one, what it does for them, and the options: wait for an update, replace it, or pay for a fix.

How Keptstone handles it

Keptstone does not change PHP versions; the host does that. It tells you which sites need it. Each site page shows the WordPress and PHP versions it runs, and the Health checks flag every site on a PHP version that no longer gets security fixes as serious, using php.net’s dates, with a warning 120 days before support ends. The client’s Site care page inside their own WordPress shows the PHP version too, so they see it is looked after.

After the switch, Keptstone’s uptime monitoring checks the site every minute and reads the page, so a critical error that still answers with a normal status is counted as down, and the connector reports PHP fatal errors with the file and the plugin they came from. All of this is in the Care plan, $2 a site a month. Keptstone does not run backups or staging sites, so use the host’s for steps 3 and 4.

Questions

Will updating PHP break my WordPress site?

Not if WordPress, the theme and the plugins are current and maintained: they support recent PHP versions. Breakage comes from old or abandoned plugins, custom code in the theme, and encoded premium plugins that need a matching loader. Testing on a staging copy finds those first.

Which PHP version should a WordPress site use?

A version that still gets security fixes from PHP's developers, and one WordPress recommends: WordPress's requirements page asks for PHP 8.3 or newer. As of 21 November 2026, PHP 8.2 gets its last security fixes on 31 December 2026, so sites on 8.2 or older should move this winter.

Can I update PHP from the WordPress dashboard?

No. PHP runs underneath WordPress, so it is changed in the hosting account (cPanel, Plesk or the host's own panel) or by the host's support team. WordPress only reports the version and warns when it is outdated.

How do I switch back if something breaks?

Choose the previous version in the same hosting panel. It takes effect within a minute or two. Then read the PHP error log to find which plugin or file failed, fix or replace it, and try again.