×
UpdatePHP Pro Log in Register
PHP expiry alert : PHP v8.1 has recently expired. Is your website still running this version? Click here for more details
SAFE versions of PHP: 8.5.12, 8.4.27, 8.3.36, 8.2.35
☰

How your PHP version affects page speed and Core Web Vitals

Google uses page experience signals, including the Core Web Vitals, as part of how it ranks pages. Relevant, useful content still matters most, but when two pages are close, the faster one has the edge. Visitors notice too: slow pages lose people before they've read a word.

For any website built with PHP (WordPress, Joomla, Drupal, Magento, Laravel and most others), the PHP version is one of the cheapest speed improvements available. Every page has to be built by PHP before the browser receives anything, so a faster PHP means everything after it starts sooner.

What the Core Web Vitals measure

  • Largest Contentful Paint (LCP): how long until the main content of the page appears. Google's "good" target is 2.5 seconds or less.
  • Interaction to Next Paint (INP): how quickly the page responds when someone clicks, taps or types. "Good" is 200 milliseconds or less.
  • Cumulative Layout Shift (CLS): how much the page jumps around while loading. "Good" is 0.1 or less.

PHP mostly affects LCP. The browser can't start drawing the page until the server has sent the HTML, and on a PHP site that time (the Time to First Byte, or TTFB) is largely PHP running your code and querying the database. A slow TTFB eats into the 2.5 second LCP budget before images, fonts or scripts have even started loading.

Why newer PHP versions are faster

PHP 7.0 was a major rewrite of the PHP engine. Real-world applications such as WordPress commonly ran around twice as fast as on PHP 5.6, while using noticeably less memory. Each release since has continued to tune the engine, and PHP 8 added further optimisations along with a JIT compiler (JIT mainly helps heavy number-crunching rather than typical web pages, but the rest of the engine work benefits everyone).

The gain you see depends on your site. A small brochure site that is already cached may barely change. A busy shop, a membership site or a WordPress install with many plugins, where most pages are built fresh for each visitor, usually improves the most.

Faster PHP also means each page uses the server for less time. On shared hosting or a small server, that leaves more headroom when traffic spikes, so pages stay fast just when you have the most visitors.

Check where your time is going

Run your page through PageSpeed Insights. If your site has enough visitors it shows real-user Core Web Vitals data from Chrome users, as well as a lab test. In the lab results, look for the "Reduce initial server response time" audit, which appears when the server takes too long to send the HTML. If you see it, the server side (PHP version, caching, database, hosting) is part of your problem and is worth fixing first.

Our guide on how to measure and improve server response time goes through measuring TTFB step by step.

Other things to fix alongside the PHP version

  • OPcache: PHP's built-in code cache should always be turned on in production. Most hosts enable it, but it's worth checking.
  • Page caching: a caching plugin or server cache can serve ready-built pages without running PHP at all for most visitors.
  • Images: oversized hero images are the most common cause of a slow LCP that has nothing to do with the server.
  • Plugins and themes: old, heavy plugins slow down every page. Upgrading PHP is a good time to remove the ones you no longer use.

Ready to speed up your PHP?

First check which PHP version your website runs. Then follow our PHP upgrade guide, and test your website on the newer version before switching the live site over.

Back to Web SEO & Security Articles
Article last updated: 21st October, 2026