Change the PHP version
Test on staging first, then switch the live site. Rolling back takes seconds.
New PHP versions are faster and supported for longer. Old plugins occasionally are not ready for them, so test before switching a live site.
Switch it
- Copy the site to staging
Sites → your site → Staging → Create from live.
- Change PHP on staging
Settings → PHP version. The pool restarts in a few seconds; nothing is lost.
- Walk the site
Home, an archive, a single page, a form, the checkout if there is one, and the plugin screens in wp-admin.
- Check the error log
Logs → PHP errors. Deprecation notices are usually harmless; fatal errors are not.
- Apply it to live
Same setting on the live site. If anything breaks, switch back to the previous version and the site returns to how it was.
We run the actively supported PHP releases and give 60 days' notice before removing one. Sites still on a removed version are moved to the oldest supported release on the announced date.
Check what a site is running
wp eval 'echo PHP_VERSION . PHP_EOL;'
wp plugin list --status=active --format=table