How to Speed Up WordPress: Using Caching, Minification and Lazy Loading the Right Way

Speed up WordPress with caching, minification and lazy loading: what each technique delivers, where the pitfalls are and in which order to tackle them.

If you want to speed up WordPress, sooner or later you’ll end up looking at caching. There’s a good reason for that: without a cache, WordPress does the same work from scratch on every single page view—even if nothing on the page has changed in weeks.

Caching is only one piece of the puzzle, though. Browser caching, minification, lazy loading and, where it makes sense, a CDN all play a part. We explain what each technique delivers, where the typical pitfalls are and in which order to optimize the performance of your WordPress website.

Why WordPress Does All the Work on Every Request Without a Cache

WordPress is a dynamic system. When someone requests a page, the server starts PHP, loads WordPress along with the theme and every active plugin, queries content, menus and settings from the database and assembles the finished HTML from all of that. Only then does the response go out to the browser.

Yet most pages on a business website look the same for every visitor—a service page or a guide, for example. They’re still rebuilt on every request. The more plugins are involved and the more visitors arrive at the same time, the longer the response takes. That’s where caching comes in: the work is done once and the result is reused.

Page Caching: Ready-Made Pages Instead of Constant Rebuilding

A page cache stores the fully generated HTML of a page as a static file. On the next request, the server delivers that file instead of calling on PHP and the database again. For visitors who aren’t logged in, this often cuts response time significantly.

Some hosting providers already offer this kind of cache at the server level; otherwise, a WordPress caching plugin takes over the job. Use only one solution for page caching. Two caches stacked on top of each other make troubleshooting harder and can easily serve outdated content.

What Shouldn’t Be Cached

A page cache only works for pages that look the same for everyone. You should exclude these areas:

  • Logged-in users: Anyone who is logged in sees the admin bar or personal content and should therefore always get a freshly generated page.
  • Forms: Some forms contain a security token that’s only valid for a limited time. If the page sits in the cache for too long, submitting the form can fail. So test your forms with caching turned on, or exclude those pages.
  • Cart, checkout and customer account: In an online store, these pages are different for every visitor. If they end up in the cache, customers may see someone else’s content. E-commerce platforms like WooCommerce usually flag these pages themselves—but check the exclusions anyway.

Clear the Cache After Making Changes

A cache shows what was true at the moment it was saved. Many solutions automatically refresh the affected page when you save a post. For changes to menus, widgets or theme settings and after plugin updates, that automation doesn’t always kick in. In those cases, clear the cache manually—otherwise you’ll be left wondering why your change isn’t showing up.

Browser Caching, Minification, Lazy Loading and CDNs

Browser Caching

With browser caching, visitors don’t have to reload images, stylesheets, scripts and fonts every time they move to another page. The server tells the browser how long it may keep a file. That helps everyone who views several pages or comes back later. To make sure the new file still loads after a change, WordPress appends a version number to enqueued files—provided the theme and plugins keep it up to date.

Minifying HTML, CSS and JavaScript

Minification strips spaces, line breaks and comments from the code. The files get smaller while working exactly the same. The gain is usually smaller than with page caching or optimized images, especially since many servers already deliver files compressed.

The pitfall is JavaScript: scripts that rely on a particular syntax or loading order can break after minifying or combining files. Suddenly the menu won’t open, a form won’t submit or the consent banner doesn’t appear. So turn on minification step by step—HTML first, then CSS, JavaScript last—and test the menu, forms and banner after each step.

Lazy Loading for Images

With lazy loading, the browser only loads images once they get close to the visible area of the screen. WordPress now adds the loading="lazy" attribute to many images out of the box.

The exception is what matters: the large image right at the top, such as a hero image, should load immediately. If it’s delayed, the main content of the first screen appears later. Also make sure your images include width and height attributes so nothing shifts around as they load.

CDN

A content delivery network distributes static files across servers in many locations, so visitors receive them from somewhere nearby. That pays off mainly for an international audience or large media files. If your website targets customers in your region and your server is located in Germany, the benefit is usually smaller. Keep privacy in mind: the CDN provider processes your visitors’ IP addresses, so you’ll generally need a data processing agreement under the GDPR.

How to Speed Up WordPress, Step by Step

What a Cache Can’t Replace

Caching speeds up delivery, but it doesn’t fix root causes. A heavy theme or a page builder with lots of code just gets rebuilt less often—it doesn’t get any leaner. Oversized images stay oversized, and scripts from third-party servers, for maps, videos or tracking, for example, are still loaded from there by the browser. Hosting remains crucial, too: for logged-in users, the admin area, a store’s checkout and every first request after the cache is cleared, the server has to generate the page itself.

That’s why we start with the fundamentals on our own website: images are stored as WebP in several sizes, fonts are hosted locally, and we don’t use an external service for appointment booking.

The Right Order

  1. Measure: Record your baseline values before changing anything.
  2. Check the fundamentals: hosting, PHP version, theme and plugins—remove whatever you don’t need.
  3. Optimize images: suitable formats and sizes, with width and height attributes.
  4. Turn on page caching: define exclusions for logged-in users, forms and store pages.
  5. Enable browser caching and lazy loading.
  6. Test minification step by step: HTML first, then CSS, then JavaScript.
  7. Add a CDN if your visitors will benefit from it.
  8. Measure again and compare the results with your baseline.

Measuring Correctly With PageSpeed Insights

Google’s PageSpeed Insights is a good tool for measuring. Besides the homepage, also test a service page and a blog post, each on mobile and desktop—and do it logged out or in a private browser window, because when you’re logged in you see the page without the cache. After clearing the cache, open the page once before testing so the cache fills up again. To keep tabs on your WordPress website’s load time, repeat the test after any major change. You can read how we approach the analysis under SEO & Performance.

How We Handle It With KakapoWP

All of the techniques described here can be set up at the server level, through your hosting provider or with established caching plugins. For our part, we developed our own plugin, Kakapo Performance, which is part of our KakapoWP plugin family. It runs locally on your server, with no third-party cloud, and covers the building blocks from this guide:

  • Page caching: Pages are stored and served as static HTML files.
  • Minification: shrinks HTML as well as inline CSS and inline JS.
  • Lazy loading: Images only load when they’re needed.
  • Browser caching: The plugin sets the necessary rules in the .htaccess file.
  • CDN integration: If needed, you can connect a content delivery network.

Each toggle works on its own, and none of them is mandatory. That lets you follow the approach described above: switch one on, test, then move on to the next feature. You decide how far you want to go.

KakapoWP includes nine plugins—besides Performance, there’s SEO, Security, Backup and Consent, among others—with one login, one support team and one invoice. You’ll find an overview at kakapowp.com. Whichever tool you choose, it won’t replace the work on your theme, images and hosting.

Frequently Asked Questions

Do I need a caching plugin if my hosting provider already caches?

Not necessarily. If your hosting provider offers a server-level page cache, a second one via a plugin is usually unnecessary. Lazy loading, minification or browser caching rules can still be worthwhile.

Can caching hurt my website?

If it’s set up incorrectly, yes—for example, when shopping carts or forms end up in the cache or minification interferes with a script. Clean exclusions and step-by-step testing prevent this. If an error does occur, turn off the feature you enabled last.

Does caching help my Google rankings?

Indirectly. When evaluating pages, Google also takes the user experience into account, and load time is part of that. It’s no substitute for good content, though.

The Bottom Line

If you want to speed up WordPress, start with the fundamentals and then build on them step by step: page caching with clear exclusions, browser caching, lazy loading, carefully tested minification and a CDN if needed. Measure before and after, and clear the cache whenever you make changes.

Want to know where your WordPress website is losing time? In a free initial consultation by phone or video call, we’ll go over where things stand and which steps make sense for you.

Marcel Czeranski

Founder and managing director of Marcze Media. He builds WordPress websites, apps, and plugins, as well as digital products of his own: Sponties, Fleißstern, and KakapoWP.

More about us