Choose a PHP version supported by your application and offered on your hosting account. Test the change on a separate copy first. A version that starts the homepage may still break a plugin, background task or checkout integration.
List the compatibility requirements
- Record the current PHP version used by the website.
- Check the application, theme and plugin compatibility requirements.
- List required extensions and any custom PHP settings.
- Take a restorable backup and note the existing per-domain configuration.
- Confirm the previous version remains available if rollback becomes necessary.
Hosting interfaces may manage PHP per domain, inherit a system version, or restrict available choices. Use the controls actually provided for your account. A command-line php --version result is not proof that the web server uses the same interpreter.
Exercise the application on the new runtime
Switch only the staging domain first, then test login, uploads, forms, scheduled jobs and payment integrations in test mode. Inspect application and hosting logs for new warnings and fatal errors. Resolve incompatibilities before changing the public site.
Do not leave a public phpinfo page behind as a runtime check. It can expose configuration details. Prefer the application’s authenticated diagnostics or hosting panel; remove any temporary test script immediately after use.
Switch with a defined acceptance check
Choose a quiet maintenance window and repeat the essential tests after changing production. If a required function fails, restore the previously recorded runtime and configuration, then investigate in staging. A plugin database migration may need separate recovery even if you revert PHP.
Once stable, keep the compatibility inventory current. Remaining on an old runtime indefinitely is not a substitute for fixing an incompatible extension or application.
Follow the critical-error guide for a failing WordPress site and keep a tested backup before each runtime change.
Sources and references
Hosting documentation. Publication and update dates reflect this edition.
Related articles
- Diagnosing a WordPress Critical Error After an UpdateFind the first PHP failure, isolate the changed component and recover without exposing debug logs.2 min read
- Creating a Private Staging Copy of Your WebsiteTest updates with separate files and data while preventing indexing, real emails and accidental production writes.2 min read
- Backing Up and Restoring a Website’s Files and DatabaseBuild a usable recovery set, protect it outside the public directory and test restoration before an outage.2 min read
