The PHP version your site actually runs on is reported by the web server: a phpinfo() file or Site Health in WordPress. php -v over SSH shows the command line PHP, which can be a different version: on our test bench the console said 8.3.6 while the site was running on 7.4.3. You switch the version in the hosting panel, but only after testing a copy of the site: an old plugin that merely logged a warning on PHP 7.4 took the site down with a 500 error on every 8.x version.
How we tested
On 10 November 2026 on a test bench: an Ubuntu 24.04.5 container with 2 vCPUs (shared with other processes at the time), nginx 1.24 and PHP-FPM, MariaDB 10.11.14, WordPress 6.4.3 with the Twenty Twenty-Four theme and 31 posts. We ran the same site on PHP 7.4.3, 8.1.2, 8.3.6, 8.4.11 and 8.5.4 from official Ubuntu packages, with identical php.ini settings and extensions, plus PHP 8.3 without OPcache and PHP 8.3 and 8.4 with JIT. Load came from ApacheBench (300 requests, concurrency 2, three runs, median reported); a small mu-plugin logged time and memory per request. Compatibility was checked with 15 short scripts and an old plugin. Support dates come from php.net and requirements from wordpress.org (both checked 10 Nov 2026). These are test bench figures, not measurements on RichHost servers.
Which PHP version to choose in November 2026
Each PHP branch gets two years of regular fixes and then two more years of security patches only. After that nobody fixes vulnerabilities in the interpreter itself, however up to date your plugins are. Status on 10 Nov 2026 according to the Supported Versions and End of Life pages on php.net:
| Branch | Status on 10 Nov 2026 | Security fixes until | What to do |
|---|---|---|---|
| 7.4 | unsupported | 28 Nov 2022 | upgrade, but check plugins first: most breakage happens here |
| 8.0 | unsupported | 26 Nov 2023 | move to 8.3 or 8.4 |
| 8.1 | unsupported | 31 Dec 2025 | move to 8.3 or 8.4 |
| 8.2 | security only | 31 Dec 2026 | upgrade before the end of the year |
| 8.3 | security only | 31 Dec 2027 | WordPress recommended minimum |
| 8.4 | active support until 31 Dec 2026 | 31 Dec 2028 | a good choice if theme and plugins are compatible |
| 8.5 | active support until 31 Dec 2027 | 31 Dec 2029 | newest branch, only after testing a copy |
The WordPress requirements page recommends PHP 8.3 or newer, although core still runs on 7.4+. Core and plugins are different things, though: an old plugin may contain code that newer PHP versions no longer understand. Other applications set their own minimum, which is why the PHP range of your PHP hosting matters (ours offers PHP 7.4 to 8.3): Moodle 5.3 and Laravel 13, for example, start at PHP 8.3, as our Moodle hosting page shows.
How to check your PHP version: four ways
1. A phpinfo() file
Create a file with a long random name in the site root, for example info-7f3k.php, containing the single line <?php phpinfo();, and open it in a browser. The three lines at the top matter. On the bench, for the site on the old version, they looked like this:
PHP Version 7.4.3-4ubuntu2.29 Server API FPM/FastCGI Loaded Configuration File /srv/cw5/conf/php_v74.ini
Server API shows what runs PHP, and Loaded Configuration File shows which php.ini applies to the site. Delete the file right after checking: server paths, modules and settings are useful hints for an attacker. If you only need the version, <?php echo PHP_VERSION, ' ', PHP_SAPI; is enough.
2. php -v does not show the site’s version
The command line PHP and the PHP serving your site are separate programs with separate settings. On the bench, at the same moment:
$ php -v PHP 8.3.6 (cli) (built: Oct 19 2026 15:16:58) (NTS) $ readlink -f $(which php) /usr/bin/php8.3 $ curl -s http://bench.test:8581/info.php | grep -o "PHP Version [^<]*" | head -1 PHP Version 7.4.3-4ubuntu2.29
On servers with several PHP versions each one usually has its own binary, /usr/bin/php7.4, /usr/bin/php8.3 and so on, and php points to one of them. Run cron jobs, Composer or WP-CLI with the same version as the site, for example /usr/bin/php8.3 wp-cron.php, or the script will behave differently from your pages.
3. WordPress Site Health
In the WordPress dashboard open Tools, Site Health, the Info tab, Server section. It lists the PHP version, PHP SAPI, memory limit and time limit. On the bench under PHP 7.4 it showed:
Web server nginx/1.24.0 PHP version 7.4.3-4ubuntu2.29 (Supports 64bit values) PHP SAPI fpm-fcgi PHP time limit 30 PHP memory limit 128M Upload max filesize 2M
Two checks on the Status tab matter when switching. The first compares your version with the recommended one via api.wordpress.org. Outgoing connections were blocked on the bench, and WordPress 6.4.3 showed a green “current version of PHP” for 7.4.3, a branch unsupported since 2022. Current WordPress code has a separate “Unable to determine” message for this case, but a green badge is not proof: compare the version with the table above. The second check covers modules. We deliberately started the pool with a minimal set of extensions, and WordPress flagged a critical issue: the required gd module and the optional curl, imagick, zip and intl were missing. This is what switching to a version without all extensions installed looks like.
4. The control panel: the domain’s PHP settings
In most hosting control panels the PHP version is set per domain in the domain settings. The server administrator can disable this choice, in which case hosting support changes the version for you.
Panels usually run each PHP version in its own PHP-FPM pool, so after switching the domain runs in a different pool with a different php.ini and its own set of extensions.
What the PHP version changes: bench results
We ran the same WordPress site on five PHP versions. The front page with ten posts weighed 104 KB, a single post page with comments 84 KB. The table shows the median of three ApacheBench runs, the time of one request with sequential requests, and peak PHP memory per request:
| Configuration | Front page, req/s | Post, req/s | Front page time, ms | Memory per request, MB |
|---|---|---|---|---|
| PHP 7.4.3 | 27.5 | 38.4 | 66 | 4.6 |
| PHP 8.1.2 | 29.6 | 39.3 | 61 | 4.1 |
| PHP 8.3.6 | 28.0 | 36.7 | 70 | 3.9 |
| PHP 8.4.11 | 27.3 | 35.6 | 63 | 3.8 |
| PHP 8.5.4 | 29.2 | 38.4 | 62 | 3.9 |
| PHP 8.3 without OPcache | 9.0 | 10.2 | 211 | 27.3 |
| PHP 8.3 with JIT | 30.4 | 42.8 | 62 | 3.9 |
| PHP 8.4 with JIT | 33.0 | 42.4 | 60 | 3.8 |

Between 7.4 and 8.5 the difference for WordPress is small. Front page throughput stayed within 27-30 requests per second, and the spread between runs of one version was comparable to the difference between versions. With sequential requests PHP 8.5 served the post page in 45 ms against 50 ms on 7.4, roughly 10% faster. The bench did not confirm any “twice as fast from one setting” promise: upgrade for security patches and treat speed as a bonus. If your site is slow, start with our guide on how to speed up WordPress.
OPcache matters more than the version. Without it the same PHP 8.3 served the front page three times slower (9 requests per second against 28), and each request used 27 MB of memory instead of 4 MB because it recompiled hundreds of WordPress files every time. After switching versions make sure OPcache is enabled in the new pool too: opcache_get_status() should return opcache_enabled set to true. The first request after a PHP restart took 0.43-0.51 s on the bench instead of the usual 0.065 s; after that the cache was warm.
JIT gives WordPress little. It added 5 to 20% throughput depending on the run, while each PHP process grew by about 10 MB. On a purely computational test (a Mandelbrot fractal in the console) PHP 8.3 with JIT finished in 0.3 s instead of 0.73 s; on 8.4 and 8.5 the gain was about 1.5x. According to the OPcache directive reference, as of PHP 8.4 JIT is disabled by default (opcache.jit=disable), and earlier it did nothing because opcache.jit_buffer_size defaulted to 0. On regular hosting these settings belong to the server administrator.
PHP 8.x used 0.5-0.8 MB less memory per request than 7.4. If your site hits the limit after switching, check memory_limit in the new pool and see how to fix Allowed memory size exhausted.
What breaks after switching
We ran 15 short snippets of typical “old” code on five PHP versions. Deprecated means a warning in the log while the code still works. Fatal means the script stops: on a site that is a 500 error or the WordPress critical error page.
| Code | 7.4 | 8.1 | 8.3 | 8.4 | 8.5 |
|---|---|---|---|---|---|
create_function(), each(), get_magic_quotes_gpc() |
Deprecated | Fatal | Fatal | Fatal | Fatal |
division by zero $total / $count |
Warning, result INF | Fatal | Fatal | Fatal | Fatal |
0 == "abc" |
true | false | false | false | false |
strlen(null), trim(null) |
works | Deprecated | Deprecated | Deprecated | Deprecated |
strftime() |
works | Deprecated | Deprecated | Deprecated | Deprecated |
utf8_encode(), dynamic properties, "${var}" |
works | works | Deprecated | Deprecated | Deprecated |
function f(string $s = null) |
works | works | works | Deprecated | Deprecated |
casts (integer), (boolean), backtick operator `...`, $a[null] |
works | works | works | works | Deprecated |
The most dangerous row is the silent one. 0 == "abc" is true in PHP 7.4 and false from PHP 8.0 on, with no warning at all. If old code compared a password, key or order status this way, the logic quietly changes after the upgrade. Only testing real scenarios catches this, not reading the log.
Reproduced on WordPress: an old plugin and a 500 error
We added a small plugin in the style of old widgets that registers itself with create_function() and opened the front page on each version with WP_DEBUG off:
PHP 7.4 HTTP 200 104207 B PHP 8.1 HTTP 500 2726 B There has been a critical error on this website. PHP 8.3 HTTP 500 2726 B PHP 8.4 HTTP 500 2726 B PHP 8.5 HTTP 500 2726 B
On 8.x the PHP log got one clear line:
PHP Fatal error: Uncaught Error: Call to undefined function create_function() in /srv/cw5/www/wp-content/plugins/old-widget/old-widget.php:10
The sneaky part: on PHP 7.4 the log was empty. The Deprecated warning only appeared after enabling WP_DEBUG, so a site owner could go for years without knowing the plugin was doomed. Visitors see the WordPress critical error page; without WordPress the same failure would look like a plain 500 Internal Server Error. Renaming the plugin folder in the file manager brought the site back at once (HTTP 200). The real fix is one line, and it works on all five versions:
add_action('widgets_init', function () { register_widget('Old_Widget'); });
Old WordPress core on the newest PHP
Separately we enabled WP_DEBUG_LOG to see what WordPress 6.4.3 core itself writes; every line below comes from wp-includes. On PHP 7.4, 8.1 and 8.3 the log stayed empty, on 8.4 one line appeared about an implicitly nullable parameter. On PHP 8.5 every front page view added 446 lines of “Using null as an array offset is deprecated”, and 40 views grew the log by 3.4 MB. The site kept working, but with logging on it answered in 70 ms instead of 62 ms. The takeaway: update WordPress and plugins first, then move to the newest PHP branch, and enable debug logging only while testing.
How to switch PHP versions safely: checklist
- Write down what you have now: version, backend template, memory_limit and list of modules. That is your rollback point.
- Make a fresh copy of files and database. Download it, do not just leave it on the server.
- Update WordPress core, theme and plugins. Updates often already include PHP 8 fixes.
- Test the new version on a copy of the site. Set up a staging copy on a subdomain and switch PHP only for it. Move to the version all your plugins support, not necessarily the newest one.
- Log errors to a private file.
WP_DEBUGtrue,WP_DEBUG_LOGwith a path outside the public folder,WP_DEBUG_DISPLAYfalse. Walk through the front page, a post, search, forms, cart, checkout and the admin area. - Go through the log.
grep -E "Fatal|Deprecated" debug.log | sort | uniq -c | sort -rn | headshows which files are noisiest. Fix every Fatal; put Deprecated on your list, since the next PHP version may turn it into a Fatal. - Compare modules. If the new version lacks gd, imagick or intl, Site Health will tell you.
- Switch the live site at a quiet time and open the key pages right away to warm up OPcache.
- Watch the log for a day. Some errors only show up in rare scenarios or in nightly cron jobs. If the site behaves oddly and the cause is not obvious, follow the steps for diagnosing hosting problems.
- Keep a way back. Restoring the previous backend template takes a minute if you noted which one it was.
If you see X, do Y
| What you see after switching | Cause | What to do |
|---|---|---|
“There has been a critical error on this website”, log shows Call to undefined function |
A plugin or theme calls a function the new version no longer has | Rename the plugin folder, switch PHP back, look for an update or replacement |
| Site works, but the log fills with Deprecated | Code written for older PHP | Hide errors from visitors, update plugins, plan the rest |
| Blank page or 500 with nothing in the WordPress log | Error before WordPress loads, or a missing module | Check the web server log and the new version’s module list |
| Logic changed after the upgrade: discounts, filters, statuses | Different string and number comparison since PHP 8.0 | Test scenarios, replace == with === in code |
| Site got slower | Empty OPcache after switching, or OPcache disabled in the new pool | Check opcache_get_status(), let it warm up, contact support |
FAQ
Will a newer PHP version make my site faster?
Slightly. On our bench WordPress on PHP 8.5 served a page about 10% faster than on 7.4, while throughput differed within the noise. OPcache had a three times larger effect. The main reason to upgrade is that versions up to and including 8.1 no longer get security patches.
Can different sites on one hosting account use different PHP versions?
In most control panels, yes: the PHP version is chosen per domain. The administrator can disable this choice; then support can change the version for you.
Should I enable JIT for WordPress?
You can, but do not expect miracles. On the bench JIT added 5 to 20% throughput depending on the run and about 10 MB of memory per PHP process. It pays off on purely computational code.
What if my favourite plugin does not work on PHP 8?
Switch back to the previous PHP version temporarily to keep the site up, and look for an update or a replacement. Staying on 7.4 for long means running without security patches, while a fix such as replacing create_function() with an anonymous function is often a few lines of code.
If you are choosing hosting for a site on modern PHP, see the RichHost hosting plans: our own control panel with an AI assistant, NVMe storage, free Let’s Encrypt certificates and servers in Europe and the USA.



