Measure before you change anything

Speed work without measurements is guessing. Two kinds of numbers matter, and they often disagree:

  • Lab tests load the page once in a controlled browser. Google’s PageSpeed Insights emulates a mid-range phone on a slow mobile connection and gives a score out of 100 plus timings. Useful for comparing before and after, noisy from run to run.
  • Field data comes from real visitors’ browsers. Google’s Chrome UX Report collects it for sites with enough traffic, over a rolling 28 days, and shows it at the top of PageSpeed Insights. This is what Google’s Core Web Vitals assessment uses.

The thresholds Google publishes, measured at the 75th percentile of visits (web.dev):

Measure What it shows Good Poor
Largest Contentful Paint (LCP) When the main image or heading appears 2.5 s or less Over 4 s
Interaction to Next Paint (INP) How quickly the page reacts to taps and clicks 200 ms or less Over 500 ms
Cumulative Layout Shift (CLS) How much the page jumps while loading 0.1 or less Over 0.25
Time to First Byte (TTFB) How fast the server starts answering 0.8 s or less Over 1.8 s

Measure phones first: most client sites get most of their visits on phones, and phones are where WordPress pages are slowest. Note the numbers before you change anything, so you can prove the change worked.

Where a WordPress page spends its time

A page load has two halves:

  1. The server builds the page. PHP loads WordPress, every active plugin and the theme, runs database queries and sends HTML back. Everything here shows in TTFB, and a slow TTFB delays everything after it.
  2. The browser shows it. It downloads the CSS, fonts, scripts and images the HTML asks for, runs the scripts, and paints. The largest image, the fonts and render-blocking scripts decide LCP; scripts decide INP; images without dimensions and late content decide CLS.

Fix them in that order. Shaving 200 KB off a script does little for a page whose server takes three seconds to answer.

Fix the server first

A page cache that actually keeps pages

A page cache stores the finished HTML so WordPress does not build it again for the next visitor. Many managed hosts cache at the server (Varnish, nginx, LiteSpeed); elsewhere a plugin does it. Two things often go wrong:

  • The cache never keeps the page. A Cache-Control: max-age=0 or no-store header, or a cookie set on every page, tells the host’s cache not to store it. Load the page twice with curl -sI and look for the cache’s own header (x-cache, x-proxy-cache, cf-cache-status) saying HIT. A common cause is a cache plugin that was removed but left its rules in .htaccess.
  • Ad and campaign links miss the cache. Visitors arriving with gclid, fbclid or utm_ parameters can get a freshly built page every time on some hosts.

An object cache

Without a persistent object cache, WordPress reads its options, menus and terms from the database on every request and forgets them at the end. Redis or Memcached, where the host offers them, with an object-cache.php drop-in, cuts the database work on pages the page cache cannot serve: logged-in users, carts, checkouts, searches.

Autoloaded options

WordPress loads every option marked autoload on every request, cached or not. Site Health warns when they pass 800 KB. A backup plugin’s list of remote copies, a security plugin’s log or a stale copy of the update list can push a site to several megabytes. Find the biggest with WP-CLI, then switch off autoload for the ones no page reads:

wp option list --autoload=on --fields=option_name,size_bytes --format=csv | sort -t, -k2 -n -r | head -15

WP-Cron on page loads

WordPress runs its scheduled tasks during visitors’ page loads. On a busy site that adds work to real visitors’ requests; on a quiet site tasks run late. Set define( 'DISABLE_WP_CRON', true ); in wp-config.php and run cron from the server instead, for example every five minutes with wp cron event run --due-now, but only if you are sure something will run it.

404s and bots

A missing image or a bot probing for /.env makes WordPress build a full 404 page, with every plugin loaded, and no page cache keeps those. Answering missing static files with a short 404 before WordPress loads, and turning away crawlers that only take, saves real server time.

The basics

A current PHP version is faster as well as safer (supported versions). The WordPress heartbeat in wp-admin and WooCommerce’s cart refresh can be slowed or limited to pages that need them. If the server is still slow after all of that, the hosting plan is the problem.

Images and fonts

  • Modern formats. WebP, and AVIF where supported, are much smaller than JPEG and PNG for the same picture. Serve them to browsers that accept them; keep the original for the rest.
  • The right size. A 2,400 pixel photo in a 400 pixel slot wastes most of its bytes. WordPress makes resized copies and a srcset; page builders’ background images often skip both.
  • Width and height on every image, so the browser reserves the space and the page does not jump.
  • Lazy loading below the fold only. WordPress adds loading="lazy" to images and, since 6.3, fetchpriority="high" to the image it guesses is the largest. Sliders and background images are often guessed wrong, so the largest image waits for everything else. The main image should load first and never lazily.
  • Fonts. Host Google Fonts on the site instead of fetching them from Google, load only the weights you use, preload the one the first screen needs, and use font-display: swap so text shows while the font loads.
  • Video. A YouTube or Vimeo embed loads a large player before anyone presses play. A cover image that loads the player on click saves most of it.

JavaScript and CSS

  • Defer scripts that do not need to run before the page shows. WordPress 6.3 and later can load scripts with a defer strategy and keeps a script blocking when code that depends on it cannot wait.
  • Delay third-party scripts (analytics, chat widgets, ad tags, heatmaps) until the visitor first moves, scrolls or taps.
  • Delay everything until the first interaction for the biggest lab gains, and the biggest risk: menus, sticky headers, sliders and search boxes that start on page load may never start.
  • Critical CSS first. Inline the CSS the first screen needs and load the rest after, so the page paints sooner.
  • Unused CSS removed, per page type, so a contact page does not download the shop’s styles.
  • Remove what nobody uses: WordPress’s emoji script, oEmbed discovery, unused block library CSS on a site without blocks.

Shops, members and other pages a cache cannot help

A page cache speeds up pages that are the same for everyone. Some of the most valuable pages on a client site are not:

  • Cart, checkout and account pages on a WooCommerce shop are built for each visitor and must never be cached.
  • Logged-in pages on membership sites, course sites and intranets.
  • Search results and filtered product lists, which differ with every query.
  • wp-admin, where the client’s staff spend their day.

For these, server speed is everything: an object cache for options and queries, fewer plugins running on every request, autoloaded options kept small, WP-Cron off page loads, and a PHP version that is current. On shops, also look at:

  • Cart fragments. WooCommerce’s script that refreshes the mini cart can call the server on every page view. Limit it to pages that show a cart, or to visitors who have one.
  • Product search. WordPress searches post content with slow LIKE queries; large catalogs benefit from a search index or a dedicated search plugin.
  • Scripts loaded everywhere. Many WooCommerce extensions load their scripts on every page, not only the shop. Load them only where they are used.
  • Order and session tables that grow without limit. Old sessions and expired data should be cleared on a schedule.

Measure these pages separately. A fast cached home page can hide a checkout that takes four seconds to answer, and the checkout is where the money is.

Why speed settings break sites

Every speed plugin’s settings screen is a list of switches that each save time and each can break something:

  • Delaying scripts can stop a menu’s dropdowns opening, a slider starting or a form submitting, and nothing shows in a screenshot.
  • Deferring a library breaks inline code in the theme that calls it straight away, with an error only the browser console shows.
  • Removing “unused” CSS removes styles a page needs after a click, such as a mobile menu.
  • Combining and minifying files can change the order styles apply.
  • Caching the wrong page can show a logged-in view, or one visitor’s cart, to others.

The first sign is usually a customer. That is why each setting needs testing on the site before visitors get it.

How to test a speed change properly

  1. Change one thing. Ten settings at once give you a result you cannot explain and a problem you cannot find.
  2. Try it where visitors cannot see it, on a staging copy or a preview that only you load.
  3. Compare the key pages before and after, on desktop and mobile: the home page, a product or service page, the cart and checkout, the contact form.
  4. Check that things still work. Open the menu, start the slider, use the search, submit the form. Look at the browser console for new errors.
  5. Measure with several runs. Lab results vary, so compare the median of three or more runs each way, not one.
  6. Keep it only if it helped, then watch real-visitor numbers over the next weeks. Field data trails by 28 days.

How to speed up WordPress turns this into steps for a single site, and how to improve Core Web Vitals starts from a failing assessment.

Speed plugins, host caches and tested settings

Speed plugins such as WP Rocket, FlyingPress, LiteSpeed Cache and the host’s own tools are good at what they do: they bundle the techniques above behind a settings screen, and many sites run well on them. What they leave to you is the testing: switching on “delay JavaScript” or “remove unused CSS” applies it to every visitor at once. On many client sites that also means one more premium plugin per site to license and update.

Whatever you use, avoid two caches fighting each other (a plugin page cache on top of a host that already caches), and keep a record of what was switched on and when, so a problem can be traced back.

Reporting speed to clients

Clients understand “the home page now appears in 2.1 seconds on a phone, down from 4.3” better than a score. Report real-visitor numbers when the site has enough traffic, a lab score when it does not, and say which. Because field data covers 28 days, report the effect of a change a month after you make it. More on what goes in a report: client reports.

How Keptstone’s speed optimizer works

Keptstone has its own speed optimizer on the Care + Protect + Speed plan ($4 a site a month): 29 settings for images, fonts, scripts, caching and the database, among them WebP images, image sizes, the largest image first, local fonts, deferred and delayed scripts, first-screen CSS, a page cache, an object cache where the host offers one, autoloaded options and fast 404s.

  • Each setting is tried on a private preview of the site that only Keptstone’s browser sees. Visitors keep getting the site as it is.
  • It is kept only if the site’s key pages still pass their checks, screenshots on desktop and mobile look the same, the home page’s menus, sticky header, sliders and search still start, no new script errors appear, and Google’s lab test, three runs each way, says it is faster. Otherwise it is turned down with the reason shown: “It stopped part of the home page working: the menu’s dropdowns”.
  • Settings that change what the server does are watched for a few days after, on the site’s own timings or real visitors’ first byte, and turned off if the gain does not show.
  • Recommendations per site come from its measurements: a slow server reply points to the page cache and object cache, a high layout shift to image sizes, a slow largest paint to the image and CSS settings.
  • It can take over from WP Rocket on a site, and give it back when you leave.

Both plans measure Core Web Vitals from real visitors, with a small script that sets no cookies, and run a weekly Google PageSpeed test. See the speed optimizer and pricing.

Questions

What is a good page speed for a WordPress site?

Use Google's Core Web Vitals for real visitors: the largest element shown within 2.5 seconds, a response to taps and clicks within 200 milliseconds, and a layout shift score of 0.1 or less, for at least 75% of visits. A lab score of 90 or more is nice, but real visitors are what Google and customers see.

Do I need a caching plugin for WordPress?

You need a page cache, but not always a plugin. Many managed hosts cache pages at the server, and a second cache plugin on top can conflict with it. Check whether your host already caches pages, and whether the pages are actually being kept, before adding one.

Why does PageSpeed Insights give a different score each time?

The lab test loads the page once on an emulated phone, and server time, third-party scripts and network timing vary from run to run. Compare the median of several runs, and rely on the real-visitor data at the top of the report, which covers the last 28 days.

Can speed optimization break a WordPress site?

Yes. Delaying scripts can stop menus, sliders and forms working, removing CSS can change the layout, and aggressive caching can show one visitor's cart to another. Apply one change at a time, check the key pages on desktop and mobile, and undo anything that changes how the site works.

Does site speed affect SEO?

Google uses Core Web Vitals as part of the page experience signals in its ranking systems, but relevant content matters far more. A faster site mostly pays off in visitors who stay and buy; better rankings for slow pages that already rank are a smaller gain.