Choosing a PHP version: compatibility and support dates
How to pick a PHP version for your site, what changed between 7.4 and 8.x that breaks old code, and why staying on old versions is risky.
On this page
Use the newest version your site runs correctly on. The question is how to find it.
Support, in brief
The PHP project supports each version for a limited time: active bug fixes first, then security fixes only, then nothing. PHP 7.4 and 8.0 no longer receive official security fixes; later 8.x versions are supported for longer. Check the official PHP “Supported Versions” page for current dates.
What commonly breaks moving from 7.4 to 8.x
| Change | Typical error |
|---|---|
| Stricter handling of wrong argument types | TypeError or ValueError |
| Removed deprecated functions | Call to undefined function |
| Warnings promoted to errors | Code that “worked” now stops |
| Accessing undefined array keys or properties | Warnings flood logs (usually harmless) |
| Dynamic properties deprecated (8.2) | Deprecation notices |
Choosing
- Check your application’s requirements page. WordPress core, current plugins and modern frameworks support recent 8.x versions.
- Update the application first.
- Switch on a staging copy, or during a quiet period with a backup. How to change the PHP version in DirectAdmin
- Read the error log for fatal errors after switching. Deprecation notices can wait; fatal errors can’t.
Custom or old code
Code written before 2019 often needs changes for PHP 8. The error log tells you exactly which line. If a site can’t be updated, it’s carrying security risk that grows every year.
Prefer to follow along?
- Upgrade your site to a newer PHP version safely
Intermediate · 30 min
Everything in this guide works on Traxio’s PHP hosting, which is £0.99 a month.
If it doesn’t work
These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.
- 500 Internal Server Error: how to fix itFind the real cause of a 500 error: read the error log, then check .htaccess, PHP errors, permissions and PHP version in order.
- Understanding PHP error messagesHow to read a PHP error: fatal errors, parse errors, warnings, notices and deprecations, what each means for your site, and where to look next.
- Blank white page: how to find the hidden errorA completely blank page usually means a PHP error that isn’t displayed. How to reveal it with logs and fix the cause.
Common questions
What PHP versions does Traxio support?
PHP 7.4, 8.0, 8.1, 8.2, 8.3 and 8.4. You can choose the version per domain in DirectAdmin and change it whenever you like.
Use the newest version your software supports — newer PHP is faster and still receiving security fixes. If a site breaks after an upgrade, switching back takes seconds, so it is a safe change to test.
Spotted something out of date or unclear? Tell us and we’ll fix it.