Skip to content

Web hosting

Changing a Website’s PHP Version with a Rollback Plan

Check application compatibility, extensions and the actual web runtime before switching PHP.

PHPCompatibilityExtensions
Reading time
2 min read
Published
Updated
Maintained by
EnderHost Team

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

  1. Record the current PHP version used by the website.
  2. Check the application, theme and plugin compatibility requirements.
  3. List required extensions and any custom PHP settings.
  4. Take a restorable backup and note the existing per-domain configuration.
  5. 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

Related topics

Hardware we trust. Software you know.

PREPARING YOUR EXPERIENCE