Which PHP Version Should Your Website Use?
Use a PHP version that still receives security fixes and that your application supports. How PHP support works, why outdated versions are risky, and how to upgrade safely.

Table of Contents
- How PHP support works
- Why outdated PHP is a problem
- What your software requires
- How to check your current PHP version
- How to upgrade PHP safely
- Planning PHP upgrades through the year
- Example: what changes between versions can break
- Common upgrade errors and fixes
- Frequently Asked Questions
- Related reading
- Sources
Use the newest PHP version that your website's software officially supports and that still receives security updates. As of 2026, PHP 8.3, 8.4 and 8.5 are in active support and PHP 8.2 receives security fixes only until the end of 2026; PHP 8.1 and older have reached end of life and should not be used for a public website.
The safe path is not "always the latest": it is the newest supported version that your CMS, theme, plugins and custom code are tested with.
How PHP support works
Each PHP release branch is supported for about four years:
- Active support (about two years): bug fixes and security fixes in regular releases.
- Security support (about two years): only critical security issues are fixed.
- End of life: no more fixes of any kind.
The current schedule is published on php.net:
| Branch | Active support until | Security support until |
|---|---|---|
| 8.2 | 31 Dec 2024 | 31 Dec 2026 |
| 8.3 | 31 Dec 2025 | 31 Dec 2027 |
| 8.4 | 31 Dec 2026 | 31 Dec 2028 |
| 8.5 | 31 Dec 2027 | 31 Dec 2029 |
Check the official page for the latest dates, because they are the authority.
Why outdated PHP is a problem
- Security: vulnerabilities found after end of life are never patched. Some hosts offer patched legacy builds, but the plugins and libraries you depend on stop supporting old versions too.
- Performance: newer PHP releases generally run the same code faster and with less memory.
- Compatibility: CMSs, plugins and frameworks drop old PHP versions over time, so you eventually cannot update them, which is a security problem of its own.
What your software requires
- WordPress recommends PHP 8.3 or greater on its requirements page, while noting that it still runs on older versions that have reached end of life.
- Plugins and themes often state a "Requires PHP" version on their listing page.
- Laravel and other frameworks set a minimum PHP version per major release in their documentation.
- Custom code needs testing by whoever maintains it.
The newest PHP branch is sometimes too new for a plugin or theme that has not been updated yet. That is why testing matters.
How to check your current PHP version
- In cPanel: MultiPHP Manager or Select PHP Version shows it per domain.
- In WordPress: Tools → Site Health → Info → Server shows the PHP version.
- On the command line:
php -vshows the CLI version, which can differ from the version your website uses.
How to upgrade PHP safely
- Take a full backup of files and database. See how to back up your website in cPanel.
- Update everything first: CMS core, plugins and themes, because new versions add PHP compatibility.
- Check compatibility notes for anything custom or abandoned.
- Test on a staging copy or a subdomain set to the new version, if your host allows it.
- Switch the version; see how to change the PHP version in cPanel.
- Check the site thoroughly: forms, checkout, logins and admin screens. Look in the error log for deprecation warnings and fatal errors.
- Keep the old version noted so you can switch back quickly if something breaks, then fix the incompatible component rather than staying on old PHP permanently.
Match PHP extensions too
When you switch versions, check that the extensions your site needs (for example intl, imagick, zip or opcache) are enabled for the new version as well. They are often configured separately per version.
Planning PHP upgrades through the year
Because each PHP branch has fixed end dates, upgrades can be planned rather than rushed:
| When | Action |
|---|---|
| A new PHP version is released (usually November) | Note it; wait for your CMS and main plugins to declare support |
| A few months later | Test your site on the new version on staging |
| Before your current version's security support ends | Move production to a supported version |
| Every year | Review which version each of your sites uses |
Running a site on a version that has passed its security-support date means vulnerabilities in PHP itself are no longer fixed by the PHP project.
Example: what changes between versions can break
PHP releases remove or change features that were deprecated in earlier versions. Typical causes of breakage in older plugins and themes include:
- functions that were removed after a deprecation period;
- stricter type handling, where passing
nullor the wrong type to built-in functions now produces errors or warnings; - dynamic properties on classes, deprecated in PHP 8.2, which older code often used.
Usually the fix is simply updating the plugin or theme. If a component has not been updated for years and breaks on current PHP, it is a sign it should be replaced.
Common upgrade errors and fixes
- White screen or "critical error" in WordPress: usually an outdated plugin or theme. See how to fix the WordPress white screen of death.
- Deprecated warnings shown on the page: turn off display of errors on production and fix the warnings in a staging copy.
- Missing function errors: a required PHP extension is not enabled for the new version.
Frequently Asked Questions
Should I always use the newest PHP version?
Use the newest version your software supports. A brand-new branch can expose incompatibilities in plugins that have not caught up yet, so test before switching production.
Does changing the PHP version affect my database?
No. The PHP version affects how code runs, not the stored data. The database server (MySQL or MariaDB) is separate.
Can different sites on one account use different PHP versions?
On cPanel with MultiPHP Manager or CloudLinux's PHP selector, often yes, per domain or per account depending on the setup.
Related reading
For the bigger picture of what your hosting provides, see what is web hosting, and compare the ServerNeed shared hosting plans.
Sources
Last updated 7 October 2026



