Skip to content
Websites

How to speed up a slow WordPress site: caching, images and PHP

Published on 3 October 2026

You can usually speed up a slow WordPress site with four things: page caching, smaller images, fewer plugins and a current PHP version. Start by measuring, though, so you know where the time goes and whether each fix actually helps. Below you’ll learn how to measure, what to do about each part and when the problem is your hosting.

How do you know if your site is fast enough?

Google uses three Core Web Vitals to measure how a page feels. They’re assessed at the 75th percentile: three out of four visits have to stay within the limit.

Core Web Vitals and their thresholds according to web.dev
MetricWhat it measuresGood if
LCP (Largest Contentful Paint)How quickly the largest piece of content appears2.5 seconds or less
INP (Interaction to Next Paint)How quickly the page responds to a click or tap200 milliseconds or less
CLS (Cumulative Layout Shift)How much the page jumps around while loading0.1 or less

Time to First Byte is useful too: how long it takes before the server sends the first byte. According to web.dev you’re in good shape at 0.8 seconds or less. Measure with PageSpeed Insights at pagespeed.web.dev and test your homepage plus a few busy pages, on mobile and desktop. Write down the results so you can compare after each step. Measure as a logged-out visitor, in a private window for example: when you’re logged in, most caching plugins skip the cache, so your site looks slower than it does for your visitors.

Why does page caching make the biggest difference?

Without a cache, WordPress rebuilds every page from PHP and the database for every single visitor. A caching plugin stores the finished page as a static file and serves that straight away. WordPress’s own optimisation guide therefore calls caching the place with the biggest gain for the least hassle. Pick one caching plugin, turn on page caching, then test your forms and, if you have one, your shopping basket. If your host supports an object cache such as Redis or Memcached, that saves database work too.

How do you make images smaller?

Photos are often the heaviest part of a page. Don’t upload them at camera size, but at the size they’re shown on your site. Choose a modern format as well. WordPress has supported AVIF since version 6.5, which according to WordPress can be up to half the size of a JPEG at the same quality, as long as your server supports it. WebP is a good alternative. Since WordPress 7.1 (August 2026), compressing and resizing uploads happens in the browser, which takes load off your server.

Lazy loading has been on by default since WordPress 5.5: images with a width and height only load when they scroll into view. So always give your images dimensions. That also stops the page from jumping around, which is good for your CLS.

How many plugins are too many?

There’s no magic number, but every plugin adds code that may run on every visit. WordPress recommends deactivating and deleting plugins you don’t use. Go through your list and ask of each one: would I miss it if it were gone? If you suspect a slow plugin, switch it off for a moment and measure again. A plugin such as Query Monitor shows which database queries take a long time and which plugin they come from.

Web hosting at CakeHosting: SSD storage, databases for WordPress, mailboxes on your own domain and DDoS protection through RoyaleHosting, with more than 6 Tbps of capacity. View the plans.

Does the PHP version really make a difference?

Yes. Newer PHP versions are faster and still get security fixes. WordPress recommends PHP 8.3 or later, and PHP 8.2 stops getting updates after 31 December 2026. WordPress’s guide also mentions OPcache, a part of PHP that keeps compiled code in memory so PHP doesn’t have to process every file again and again. Test a new PHP version on a copy of your site first, because an outdated plugin can trip over it.

Does a lighter theme help?

A theme with sliders, animations and a heavy page builder loads a lot of CSS and JavaScript, even on pages that don’t need it. A simple block theme loads less. If you switch themes, check whether your pages rely on shortcodes from the old theme or your page builder, or you’ll end up with odd codes in your text.

What about the database?

After a few years your database fills up with old revisions, expired temporary data and spam comments. A clean-up plugin removes them; WordPress mentions such plugins in its own guide. Always back up your database first, because once it’s gone, it’s gone.

What do speculative loading and a CDN do?

Since WordPress 6.8, your site starts loading a page as soon as a visitor begins clicking a link. That’s called speculative loading, and it’s set conservatively by default. A CDN puts your images, CSS and JavaScript on servers spread around the world, close to your visitors. That takes load off your own server and helps most when your visitors come from different countries.

And if it’s still slow?

If your Time to First Byte stays high even with caching, the server is the likely culprit. According to web.dev, shared hosting is generally slower and your host has to be able to handle the traffic you send it. Then it’s time for a bigger plan or a different host. Moving doesn’t have to be scary: with our step-by-step guide your visitors won’t notice a thing. You’ll find more articles about websites on our blog.

In the end, speed is a lot like baking: the oven does plenty, but you’ll never get a light sponge out of a heavy lump of dough. Start with the biggest win and measure after every step.

Frequently asked questions

Why has my WordPress site suddenly become slow?

Often because of a new plugin or update, a large image on your homepage or a spike in traffic, sometimes from bots. Check what changed recently, measure with PageSpeed Insights and switch new plugins off for a moment to test.

Which caching plugin should I choose?

Choose one that’s well maintained and suits your hosting, and never run two caching plugins at once. Ask your host whether the server already has its own cache, so you don’t cache twice.

Is AVIF better than WebP?

AVIF is usually smaller at the same quality. WordPress has supported AVIF since version 6.5, as long as your server can process it. If it can’t, WebP is a fine choice.

Will a faster server really help?

For Time to First Byte, yes: the server decides how quickly the first byte arrives. It won’t fix large images, heavy themes or too many scripts, because those live in your site itself.

How often should I measure my site’s speed?

After every big change, such as a new theme or plugin, and otherwise once a month. Spot something odd you can’t explain? Let us know.

More questions? See all frequently asked questions

Related articles