Each PHP release brings speed improvements and security fixes, and older versions stop receiving patches. A PHP version upgrade is usually smooth if you check compatibility first and switch one site at a time. Use this checklist on cPanel hosting or your own VPS.
Before you start
- A current backup of files and database.
- The PHP version the site runs now (cPanel MultiPHP Manager, or
phpinfo()). - The target version: the newest one your application officially supports.
Check application compatibility
- CMS core: check the supported PHP versions for your WordPress, Joomla, Drupal, Magento, PrestaShop or framework release. Update the core first if needed.
- Plugins, themes, modules: outdated or abandoned extensions are the main source of breakage. Update all of them and replace ones without recent updates.
- Custom code: scan with PHPCompatibility:
composer global require phpcompatibility/php-compatibility squizlabs/php_codesnifferphpcs -p --standard=PHPCompatibility --runtime-set testVersion 8.3 --extensions=php --ignore=vendor/ /path/to/site - Composer projects:
composer why-not php 8.3shows which packages block the version.
Common breaking changes to look for
| From → to | Typical issues |
|---|---|
| 7.x → 8.0 | Stricter type errors, removed each() and create_function(), changed string-to-number comparisons |
| 8.0 → 8.1 | Deprecation notices for passing null to internal functions |
| 8.1 → 8.2 | Dynamic properties deprecated |
| 8.2 → 8.3/8.4 | More deprecations; check extensions like ionCube availability |
Deprecations do not break the site but flood logs; fix them before they become errors in the next major version.
Test on a staging copy
- Create a staging copy (WordPress staging tools, Softaculous clone, or a subdomain).
- Switch only the staging site to the new PHP version.
- Click through key flows: home page, login, admin, forms, checkout, search, cron tasks.
- Watch the PHP error log while testing.
Match extensions and settings
Each PHP version has its own extensions and ini values:
- cPanel: after switching in MultiPHP Manager or Select PHP Version, re-check enabled extensions (intl, imagick, sodium, ionCube) and options (memory_limit, upload sizes, max_execution_time).
- VPS: install the same extensions for the new version (
php8.3-intl, etc.), copy custom php.ini and FPM pool settings, and point Nginx'sfastcgi_passto the new socket.
Switch production
- cPanel: select the domain in Software → MultiPHP Manager and apply the new version; it takes effect immediately for that domain only.
- VPS: run the new PHP-FPM version alongside the old one, switch one site's
fastcgi_pass, reload Nginx, and keep the old FPM running until you are confident. - Also update the PHP version used by cron jobs and CLI scripts (Composer, WP-CLI, artisan).
Roll back if needed
Switching back is as quick as switching forward: select the previous version in cPanel, or point fastcgi_pass back to the old socket. Then fix the incompatibility and try again.
After the upgrade
- Watch error logs for a few days.
- Clear caches (OPcache resets on FPM reload; purge page caches).
- Remove the old PHP version from the VPS once nothing uses it.
PHP upgrade FAQ
Will a newer PHP make my site faster?
Usually yes: PHP 8.x is noticeably faster than 7.x for most applications.
Can different sites use different PHP versions?
Yes, on cPanel per domain with MultiPHP Manager, and on a VPS with separate FPM pools.
What if a critical plugin does not support the new version?
Stay on the newest version it supports while you find a replacement; do not stay on an end-of-life PHP for long.
