Knowledgebase

Migrating Between PHP Versions Print

  • developersgitdeployment, developers, php, migration, errors, troubleshooting, cpanel, domain, backup, security
  • 0

Upgrading without breaking the site.

BEFORE CHANGING

Check your application's stated compatibility Check every dependency's compatibility Read the deprecation notices in your current error log, which predict what will break Take a backup

THE PROCEDURE

  1. Test on staging first, with the new version.
  2. Exercise every part of the application.
  3. Read the error log for deprecations, warnings and fatal errors.
  4. Fix what appears.
  5. Only then change production.

CHANGING IT

cPanel > MultiPHP Manager. The change is immediate and per domain.

WHAT USUALLY BREAKS

Functions removed in the newer version Stricter type handling causing errors where values were previously coerced Changed default behaviour Old dependencies not updated for the new version

IF IT BREAKS

Switch back immediately from the same screen, then fix the code before trying again.

MISSING EXTENSIONS

A new PHP version has its own extension selections. Enable what your application needs under Select PHP Version.

WHY DO IT

Newer versions are substantially faster, and unsupported versions receive no security patches.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot