PHP 8.2 security support ends on 31 December 2026. After that date the PHP project will not issue further security fixes for that branch, so a WordPress site still running 8.2 is on a version with no upstream patches. This guide shows how to move the site to PHP 8.4 or 8.5 in cPanel, check it properly, and switch back in one step if something breaks.
Why PHP 8.2 has to go
Each PHP branch gets two years of active support (bug fixes and security fixes), then two further years of security-only fixes. Official dates from php.net’s supported versions page:
| Branch | Initial release | Active support until | Security support until |
|---|---|---|---|
| PHP 8.2 | 8 December 2022 | 31 December 2024 | 31 December 2026 |
| PHP 8.3 | 23 November 2023 | 31 December 2025 | 31 December 2027 |
| PHP 8.4 | 21 November 2024 | 31 December 2026 | 31 December 2028 |
| PHP 8.5 | 20 November 2025 | 31 December 2027 | 31 December 2029 |
| PHP 8.6 | 19 November 2026 | 31 December 2028 | 31 December 2030 |
WordPress will usually keep loading on an unsupported PHP version. That is not a reason to stay: newly discovered issues in 8.2 will not be fixed after 31 December 2026. The WordPress Hosting Team already flags this in its WordPress 7.1 server compatibility note and asks hosts to plan migrations for sites still on 8.2.
Which version to choose: PHP 8.4 or 8.5?
For a new WordPress 7.1 installation, the Hosting Team recommends PHP 8.4.x or 8.5.x. Its server environment handbook (updated 24 November 2026) also recommends PHP 8.4 or later for production: 8.4 is fully supported by WordPress 6.7 and later, and 8.5 by WordPress 6.9 and later.
Both 8.4 and 8.5 are good targets. The practical difference is the support window:
- PHP 8.5 stays in active support until 31 December 2027, and in security support until 31 December 2029. If your theme and plugins run on it, this is the longer runway.
- PHP 8.4 leaves active support on 31 December 2026 (the same day 8.2 ends) and then remains in security support until 31 December 2028. It is still a supported, handbook-recommended choice.
- PHP 8.3 is already on security-only support, which lasts until 31 December 2027. It is safer than 8.2, but it is not the version the handbook recommends for new work.
- PHP 8.6 was released on 19 November 2026. WordPress 7.2 has been made compatible with it as of that branch’s Beta 5, but the Hosting Team’s recommendation for WordPress 7.1 remains 8.4.x or 8.5.x. Wait until your WordPress version, theme and plugins have been tested on 8.6 before making it the live version.
The same PHP versions matter for other PHP apps on the server, including Laravel hosting. Change one domain at a time, and test each app on a copy first.
Before you change anything
Do these on the live site before you touch the PHP version.
1. Update WordPress, themes and plugins
Apply current updates for WordPress itself, the theme and every plugin. Many PHP 8.4 and 8.5 issues are already fixed in current releases, and you want those fixes in place before you change the runtime.
2. Take a backup you can restore
Take a full account backup, or at least a complete copy of the files and the MySQL database, immediately before the change. On HosterOcean, daily restore points are also available in JetBackup inside cPanel, which can restore files, the database or the whole account. A backup is what you use if a rollback of the PHP version is not enough — for example if a failed update has already changed files or data.
3. Use a staging copy
Do not make the live site the first place you try a new PHP version. Copy the site to a subdomain, a staging tool if your plan includes one, or a separate cPanel account, and run the steps below there first. Confirm the home page, wp-admin, a form submission and, if you have a shop, a test checkout.
How to change the PHP version in cPanel
On a cPanel server you will usually see one of two tools. MultiPHP Manager is the cPanel / EasyApache 4 interface. Select PHP Version is the CloudLinux PHP Selector. The idea is the same: pick PHP 8.4 or 8.5 for the domain, check the extensions, apply, and you can switch back if needed.
Option A: MultiPHP Manager
- Log in to cPanel and open MultiPHP Manager (under Software).
- Tick the domain or subdomain you want to change — the staging copy first, not the live domain.
- In the PHP version list, choose 8.4 or 8.5 and apply it.
- If you need to raise
memory_limitor other settings for that version, use MultiPHP INI Editor for the same domain. For changing the samephp.inivalues across every installed version on a server you control, see how to update PHP settings for every PHP version in cPanel and CloudLinux.
Option B: Select PHP Version (CloudLinux)
- Log in to cPanel and open Select PHP Version.
- Choose 8.4 or 8.5 from the version list and set it as the current version.
- Open the extensions list for that version and save once the WordPress extensions below are enabled.
If PHP files start downloading in the browser after a move or a handler change, that is a different problem: a leftover PHP handler in .htaccess, which we cover in how to fix PHP files downloading instead of running.
Extensions WordPress needs
After you switch version, confirm the extensions WordPress actually uses are on. The Hosting Team handbook lists json, hash and mysqli as required, and highly recommends curl, dom, exif, fileinfo, igbinary, imagick, intl, mbstring, openssl, xml and zip. If Imagick is not available, the gd (image) extension is the usual fallback for media.
In Select PHP Version you tick these in the extensions list. In MultiPHP Manager the extensions are those compiled into that EasyApache package; if one is missing, open a ticket rather than guessing at a custom build. You can also confirm what WordPress sees under Tools → Site Health → Info → Server.
Check the site and the error logs
On the staging copy, and again after the live cutover, do a short pass:
- Load the home page, a post or product, and a search or form.
- Log in to
/wp-adminand open the theme customiser, the plugin list and Site Health. - If you run WooCommerce or another shop, place a test order in a staging environment.
Then read the logs. In cPanel, check Errors (or the account’s error_log in File Manager) for PHP fatal errors and warnings from the new version.
For a WordPress-specific log, you can add the following to wp-config.php above the line that says “That’s all, stop editing!” — and only for the duration of the test:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
WP_DEBUG_DISPLAY stays off so visitors do not see PHP errors. Warnings and fatals go to wp-content/debug.log. When the site is clean, remove or turn off those lines so the log file does not keep growing, and delete the log if it contains paths or request data you do not want left on disk.
Live cutover and instant rollback
Once the staging copy is clean, apply the same PHP version to the live domain in MultiPHP Manager or Select PHP Version. Repeat the front-end, wp-admin and log checks.
If a plugin or theme throws a fatal error, switch the domain back to the previous PHP version in the same cPanel tool. That is the instant rollback: it does not alter your files or database, and the live site should return to how it was. Then fix the incompatible plugin or theme on staging before you try the new version again.
Use the JetBackup or cPanel backup if the problem is not just the PHP version — for example if an update already changed files, or you need to restore a database. If you would rather not do the cutover yourself, our team can handle PHP upgrades and other work under server management.
Frequently asked questions
When does PHP 8.2 reach end of life?
On 31 December 2026, according to the official PHP supported versions page. Active support already ended on 31 December 2024; the remaining window is security-only.
Will the WordPress site stop working on 1 January 2027?
No. The site will keep running on PHP 8.2 until you change the version. The risk is that new security issues in 8.2 will not be patched after end of life. WordPress 7.1 still lists 8.2 as compatible for backward compatibility, but the Hosting Team recommends moving off it.
Should I move to PHP 8.4 or PHP 8.5?
Either is a handbook-recommended target for WordPress 7.1. Choose the higher of the two that your theme and plugins support on a staging copy. PHP 8.5 has the longer active-support window (until 31 December 2027).
Can I change PHP for one domain only?
Yes. MultiPHP Manager applies a version to the domain or subdomain you select. Select PHP Version sets the version for that cPanel account. You do not have to change PHP for every site on the server at once.
What if a plugin is not compatible with PHP 8.4 or 8.5?
Roll the domain back to the previous PHP version, then update, replace or disable that plugin on staging and test again. Staying on PHP 8.2 past 31 December 2026 to keep an unmaintained plugin is a weaker position than replacing the plugin.
Is PHP 8.6 ready for WordPress?
PHP 8.6 was released on 19 November 2026. WordPress 7.2 is fully compatible with it as of that branch’s Beta 5, but support is not something to assume for older WordPress releases, or for every theme and plugin. For a WordPress 7.1 site today, PHP 8.4 or 8.5 is the path the Hosting Team recommends.
WordPress hosting at HosterOcean
If you are moving the site as well as the PHP version, start from WordPress hosting or cPanel shared hosting. Both give you cPanel, so the MultiPHP or Select PHP Version steps above apply, and you can follow our guide to install WordPress on cPanel if you are building a new site rather than moving one.
Need a hand with the upgrade? Open a ticket and tell us the domain and the PHP version you want to move to. We will look at it on your account.
Tags:
Related articles
How to Update PHP Settings for All Versions in cPanel & CloudLinux Using a Bash Script
Use a bash script to change PHP settings for every PHP version on a cPanel and CloudLinux server in one go.
Read More →How to Fix PHP Files Downloading Instead of Executing
Why PHP files download instead of running after a move to LiteSpeed, and how to fix the .htaccess handlers causing it.
Read More →How to Install WordPress on cPanel
Two ways to install WordPress on a cPanel account: Softaculous, or a manual install with a database you create yourself.
Read More →



