Skip to content

Cookie settings

Choose which kinds of cookies you allow. You can change your choice at any time via Cookie settings at the bottom of every page. Privacy statement

Necessary

Always on

Needed to log in, keep your cart and remember your choices. These are always on.

Which cookies?
  • weboke_sessie, weboke_klant, weboke_remember: your session and staying logged in
  • weboke_basket: your cart
  • wkBtwIncl: showing prices with or without VAT
  • wok_cookies: your cookie choice, 12 months

Measures which ad leads to a visit or order, so we do not pay for ads that do nothing.

Which cookies?
  • Google Ads via Google Tag Manager (_gcl_au, _gcl_aw), up to 90 days
  • OpenAI Ads, ads in ChatGPT
  • wok_aff: which partner referred you to us (affiliate programme), 60 days

4.6

Country and language

Each country has its own site, with prices and VAT for that country.

View

Module 6 · 6.1

English

What makes a website slow, and how do you measure it?

Module 6: Speed · Reading time: 9 minutes

Learning objective: After this lesson, you can measure where the time is going and recognise the difference between slowness on the server and slowness in the browser.

Key concepts: TTFB, Core Web Vitals (LCP, INP, CLS), lab data, field data, PageSpeed Insights, network tab, compression, external scripts, hosting package limits, 503

Measure first, then fix

"The website is slow" can have ten different causes. If you install a caching plugin, an image optimisation plugin and a bigger package all at once without measuring, you won't know afterwards what actually helped, and you'll have three extra things to maintain. So always start with three questions (the same ones as in your hoster's guide):

  1. Is everything slow, or just the admin area? A slow admin area with a fast front end points to plugins that do a lot of work in the admin area, or to bots hammering the login page.
  2. Always, or only at certain times? Only during busy periods or when a scheduled task runs: then your package is hitting its limits.
  3. For everyone, or only for you? Try it on your phone via 4G or 5G, or ask someone else. If it's only slow for you, the cause lies with your connection or VPN.

Two halves: server and browser

The time a visitor waits consists of two parts (lesson 1.2):

  1. The server builds the HTML: web server, PHP, plugins, database. You see this as TTFB (time to first byte), the time until the first byte of the response arrives. web.dev's rule of thumb is that most websites should aim for a TTFB of 0.8 seconds or less.
  2. The browser reads that HTML and then fetches everything it contains: stylesheets, scripts, fonts, images, video, tracking codes, chat widgets. Only once enough of this has arrived does the visitor see something.

You fix a high TTFB on the server side: caching (lesson 6.2), fewer or lighter plugins, a newer PHP version, a tidied-up database (lesson 6.3), or more processing power. A low TTFB with a slow page anyway points to the browser side: oversized images, too many scripts, external components.

Core Web Vitals

Google measures the visitor experience with three figures, the Core Web Vitals:

MeasurementWhat it measuresGood if
LCP (Largest Contentful Paint)How quickly the largest piece of content (often the large photo or the heading) becomes visible2.5 seconds or less
INP (Interaction to Next Paint)How quickly the page responds when you click, tap or type200 milliseconds or less
CLS (Cumulative Layout Shift)How much the page shifts while loading0.1 or less

INP replaced the older FID measurement in March 2024. Google uses these figures partly when ranking search results, but the main reason to improve them is simple: visitors leave when a page is slow or keeps shifting.

Lab data and field data

There are two kinds of measurements, and they give different numbers:

  • Lab data: a test at one moment, from one location, with a simulated phone and connection. Useful for comparing (before and after a change), but it's not a real visitor.
  • Field data: measurements from real visitors using Chrome, over the past 28 days. That's what visitors actually experience. Small websites often don't have enough visitors for field data.

PageSpeed Insights (pagespeed.web.dev) shows both: field data at the top (if available), and a lab test with a score and specific recommendations below it. Don't just look at the score out of 0 to 100. Look at the components: is LCP poor because the server is slow (TTFB), or because the large photo is 3 MB?

Always test a few times (the numbers vary), and also test an ordinary page, not just the homepage.

Taking a look yourself with the browser

Your browser's developer tools (F12) show what's really happening:

  • Network tab: refresh the page with the cache disabled (tick "Disable cache"). You'll see every file being loaded, how big it is and how long it took. Sort by size: the largest files are often images. Sort by domain: how much comes from other parties (fonts, tracking codes, videos)?
  • The first request (the HTML itself): click on it, Timing tab. "Waiting for server response" is the TTFB.
  • Headers of that first request: is there compression (content-encoding: br or gzip), and did the page come from a cache (lesson 6.2)?

The usual culprits

In practice, slowness in WordPress is usually caused by one of these:

  1. No page cache: every page is rebuilt from scratch on every visit (lesson 6.2).
  2. Too many or heavy plugins, especially plugins that call external services or run heavy queries on every request (lesson 5.3).
  3. Large images: a 5 MB photo from a phone on the homepage (lessons 4.4 and 6.3).
  4. A heavy theme or a page builder that loads lots of scripts and stylesheets on every page (lesson 5.1).
  5. External components: fonts, videos, chat widgets, tracking codes, social media buttons from other parties. Each is a connection to another server, which can be slow.
  6. An old PHP version (lesson 8.4).
  7. A cluttered database: thousands of revisions, spam, plugin log tables (lesson 6.3).
  8. Bots: crawlers, AI crawlers and login attempts keep your package busy (lesson 7.3).
  9. The package is hitting its limits: not enough processing power (CPU), processes or memory for the traffic.

The limits of your package

With shared hosting, each package gets a fixed share of the server: processing power, memory, disk speed and a number of simultaneous processes. If your website uses more, it gets throttled, or visitors get a 503 error (Service Unavailable, called "Resource Limit Is Reached" by some hosters). In DirectAdmin with CloudLinux you see this under Resource Usage (with "faults" if your website was throttled), and X-Ray shows you, per page, which plugin or query is costing time. Other hosters have similar overviews, sometimes only on request.

A bigger package helps if your website genuinely needs more (a busy webshop). It doesn't fix a badly set up website: the problem will come back later. Find the cause first.

Summary

  • Measure first: everything or just the admin area, always or sometimes, everyone or only you.
  • TTFB is the server side (aim for 0.8 seconds or less); the rest is what the browser loads.
  • Core Web Vitals: LCP (2.5 s), INP (200 ms) and CLS (0.1); INP replaced FID in 2024.
  • PageSpeed Insights shows field data and lab data; the network tab shows what's really loading.
  • Most slowness comes from no cache, heavy plugins, large images and external components; a bigger package is only the last step.

Quiz

1. Your homepage's TTFB is 3 seconds. Where do you look for the cause?



2. What does INP measure?



3. PageSpeed Insights gives a slightly different score on every test. What's the explanation?



4. Your website returns a 503 error at busy times. What's the best first step?



Exercise

Exercise A6.1: Measure your TTFB and compression. Enter your website's address and, if you like, one ordinary page (for example your contact page). The tool requests each page three times without cookies and gives the median TTFB, the size of the HTML, and whether the server sends the HTML compressed (content-encoding gzip or br). Compare the result with a test in PageSpeed Insights and note down what you notice.

Exercise A6.1: Measure your TTFB and compression



What you enter and what we find isn't stored. Your browser remembers your answers and whether you've passed the exercise. If you're signed in, we only save that you got the exercise (almost) right in My courses; you can delete that there too.

Further reading

These articles describe the steps in WebOké's panels; they work similarly in other panels.

One moment…

Set up your domains

For each domain, arrange the nameservers, the link to your hosting and who becomes the owner.

Loading your domains…