Get started

PHP 8.6 is out: what changes, and how to test your site on it in cPanel

PHP 8.6 was released on 19 November 2026 and is now in cPanel’s EasyApache 4. See what is new, what can break, and how to test a site on PHP 8.6 before you switch.

5 December 2026 · 6 min read

PHP 8.6.0 was released on 19 November 2026. It is a major update, with partial function application, a new \Time\Duration class, a clamp() function and a long list of deprecations. Five days later, on 24 November, cPanel added it to EasyApache 4 as the ea-php86 package, so it can now be installed on cPanel servers and chosen per domain.

That does not mean every site should switch today. This guide covers what changed, what tends to break, and how to test a site on PHP 8.6 in cPanel without risking the live one.

What is new in PHP 8.6

The headline features, from the official release announcement:

  • Partial function application. You can fill in some of a function’s arguments now and get back a closure that takes the rest, using ? and ... placeholders.
  • \Time\Duration. A class for elapsed time, with nanosecond precision, for timeouts and benchmark timings.
  • Io\Poll. A polling API that watches many streams at once using epoll, kqueue and similar mechanisms, without the limits of stream_select(). It is aimed at event-loop libraries such as ReactPHP and AMPHP.
  • clamp(), which keeps a value inside a range, and a SortDirection enum.
  • Default values for readonly properties, so fixed values no longer have to be set in the constructor.

For most websites, the new features matter less than the changes that can make old code throw warnings or errors. Those are below.

Support dates: where PHP 8.6 fits

According to php.net, each PHP branch gets two years of active support and then two years of security fixes only. For the versions you are likely to choose between:

  • PHP 8.4: security fixes until 31 December 2028.
  • PHP 8.5: active support until 31 December 2027, security fixes until 31 December 2029.
  • PHP 8.6: active support until 31 December 2028, security fixes until 31 December 2030.

PHP 8.2 reaches end of life on 31 December 2026. If a site still runs 8.2, moving it to 8.4 or 8.5 is the urgent job, and our guide to moving WordPress off PHP 8.2 covers it. PHP 8.6 is the version to test next, not a reason to skip that move.

Changes that can break existing code

The full list is in the PHP manual’s migration guide. These are the ones most likely to show up on a typical PHP or WordPress site:

New deprecations

  • Using return inside a finally block.
  • Returning a value from __construct() or __destruct().
  • The mbstring regular expression functions, such as mb_ereg() and mb_split(), because the Oniguruma library behind them is no longer maintained. PCRE functions with the u modifier replace them.
  • The aliases is_double(), is_long(), is_integer() and doubleval(). Use is_float(), is_int() and floatval().
  • spl_object_hash(), strcoll(), a third argument to define(), and passing an object where functions such as http_build_query() expect an array.

Deprecations do not stop a site working. They write a notice to the error log, and the feature is removed in a later version. Old plugins that use these functions can fill an error_log file quickly, though.

Behaviour changes

  • Safer session defaults. session.use_strict_mode and session.cookie_httponly are now on by default, and session.cookie_samesite defaults to Lax. If your php.ini does not set these explicitly, a script that reads the session cookie from JavaScript, or relies on it in cross-site requests, can behave differently.
  • Write failures are reported. fclose(), file_put_contents() and copy() now return false when flushing or closing the stream fails, instead of ignoring it. Code that saves to remote storage through a custom stream wrapper is the most likely to notice.
  • More ValueErrors. Many functions now throw an error for out-of-range values, invalid flags or strings containing NUL bytes, where they used to truncate or ignore them silently.
  • trim(), ltrim() and rtrim() now also strip form feed characters.

Is WordPress ready for PHP 8.6?

WordPress core is. The WordPress core team says WordPress 7.2 is fully compatible with PHP 8.6 as of its Beta 5 release, and that all known PHP 8.6 issues in core have been fixed. WordPress 7.2 is due on 8 December 2026 (see updating to WordPress 7.2 safely).

Plugins and themes are another matter, and the core team asks site owners to check them. Its notes list a few PHP 8.6 changes that affect plugin code: TrueType fonts are now identified as font/ttf instead of font/sfnt, custom stream wrappers need a stream_flush() method or saves fail, and code that flipped images in GD by passing negative sizes breaks. If you run WordPress, update to 7.2 first, then test PHP 8.6.

How to test a site on PHP 8.6 in cPanel

1. Check whether PHP 8.6 is installed

In cPanel, open Software » MultiPHP Manager and look at the PHP version list. If PHP 8.6 is not there, it has not been installed on the server yet. On CloudLinux servers, versions may also be offered in Select PHP Version.

If you run your own server, install it in WHM: Software » EasyApache 4, Customize the current profile, select PHP 8.6 on the PHP Versions page (choose PHP 8.6 and Extensions to copy the extensions your other versions use), then review and Provision. Installing a version does not move any site to it. Note that cPanel’s updated default EasyApache profiles now include PHP 8.4 and no longer include PHP 8.2.

2. Make a copy of the site

Test on a copy, never on the live site first. For WordPress, WP Toolkit’s Clone creates a staging copy on a subdomain. For other PHP apps, copy the files and the database to a subdomain. Take a backup of the live site either way; on our hosting, the daily JetBackup copies let you restore files and databases yourself.

3. Switch only the copy to PHP 8.6

In MultiPHP Manager, tick the staging domain, choose PHP 8.6 from the menu and click Apply. The change applies to that domain only, and you can switch back the same way at any time.

4. Click through the site and read the logs

Turn on WordPress’s debug log on the copy (in wp-config.php):

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Then test the parts that matter: logging in, forms, checkout, image uploads, scheduled tasks. Read wp-content/debug.log, the error_log files and Metrics » Errors. Deprecation notices can usually wait for a plugin update; fatal errors cannot. With SSH access on a cPanel server, PHP 8.6’s command-line binary is at /opt/cpanel/ea-php86/root/usr/bin/php, which is useful for running cron scripts or Composer against the new version.

5. Move the live site, or wait

If the copy runs cleanly, switch the live domain in MultiPHP Manager and watch the error log for a day. If a plugin you depend on is not ready, stay on PHP 8.5 or 8.4. Both have years of security support left, so there is no rush.

Frequently asked questions

When was PHP 8.6 released?

PHP 8.6.0 was released on 19 November 2026. It gets active support until 31 December 2028 and security fixes until 31 December 2030.

Does cPanel support PHP 8.6?

Yes. cPanel added PHP 8.6 to EasyApache 4 as ea-php86 in version 25.100 on 24 November 2026. Your host has to install it before it appears in MultiPHP Manager.

Should I upgrade my website to PHP 8.6 now?

Test it first on a copy. If your plugins, theme and custom code run without errors, you can move. If not, PHP 8.5 and 8.4 are still supported for years.

Is WordPress compatible with PHP 8.6?

WordPress 7.2 is fully compatible with PHP 8.6, according to the WordPress core team. Check each plugin and theme as well, because they are not covered by that statement.

What is new in PHP 8.6?

Partial function application, the \Time\Duration class, the Io\Poll API, clamp(), the SortDirection enum and default values for readonly properties, plus new deprecations and safer session defaults.

Hosting where you choose the PHP version

On our shared hosting and WordPress hosting you set the PHP version per domain in cPanel and can switch back in seconds, with daily JetBackup backups behind you. Running Laravel or a custom app? See Laravel hosting, or use a VPS for full control of the PHP build. If you would rather someone else tested the upgrade, open a ticket and tell us what the site runs.

Tags:

PHP 8.6 cPanel

PHP 8.6 release

ea-php86 EasyApache 4

WordPress PHP 8.6

MultiPHP Manager

WordPress Guide

PHP 8.2 support ends on 31 December 2026: how to move WordPress to PHP 8.4 or 8.5 in cPanel

Back up, test on a staging copy, switch the PHP version in MultiPHP Manager, and switch back in seconds if something breaks.

Read More →

WordPress Guide

WordPress 7.2 arrives on 8 December: how to update safely in cPanel

See what changes, check whether your site will update itself, and test the update on a staging copy before it reaches the live site.

Read More →