If you could only make one change to speed up a WordPress site, it would almost certainly be caching. WordPress builds every page dynamically by running PHP and querying the database. Without caching, it repeats that work for every single visitor, even when the result is identical.
Caching saves the result so it can be reused. But there are several kinds of cache, and they do different jobs. Here is a plain guide to each one.
1. Page Caching
A page cache stores the finished HTML of a page and serves it directly, skipping PHP and the database. This is the cache that gives the largest improvement in server response time, and therefore in LCP.
What to know:
- It works best for pages that look the same for everyone, such as posts, pages and category archives.
- Logged-in users, carts, checkouts and account pages should be excluded.
- Use cache preloading so the first visitor after a purge does not get a slow page.
- Use only one page caching solution. Running a host-level cache and a caching plugin that both try to create page caches can cause conflicts and stale content.
2. Browser Caching
Browser caching tells a visitor’s browser to keep copies of static files such as images, CSS, JavaScript and fonts for a period of time. On a return visit, the browser reuses its local copies instead of downloading them again.
Set long expiry times for files that rarely change, and use versioned file names or query strings so that updated files are fetched when you change them. A good caching plugin or your host will usually add these headers for you.
3. Object Caching
Object caching stores the results of database queries and other expensive operations in memory, usually in Redis or Memcached. WordPress has a built-in object cache, but by default it only lasts for a single request. A persistent object cache keeps data between requests.
This matters most for sites that cannot rely only on page caching: WooCommerce stores, membership sites, forums and heavy admin screens. It will not do much for a small brochure site that is fully page cached.
4. OPcache
PHP code has to be compiled before it runs. OPcache stores the compiled version in memory so PHP does not repeat that step on each request. It is a server setting and is enabled on most modern hosts. If you manage your own server, make sure it is on and sized sensibly.
5. CDN Caching
A content delivery network keeps copies of your files on servers around the world and delivers them from the nearest location. For a site with visitors across the US, UK, Europe, Canada and Australia, this reduces latency noticeably. Some CDNs can also cache full HTML pages at the edge, which gives the fastest response times of all.
How the Layers Work Together
Imagine a visitor opening a blog post. The CDN may answer immediately from a nearby location. If not, the server’s page cache returns the stored HTML without running PHP. If the page is not cached, WordPress builds it, using the object cache to avoid repeating database queries. Finally, the browser stores the images, CSS and JavaScript so the next page loads faster.
Setting It Up Safely
- Check what your host already provides. Many hosts include server-level page caching and sometimes Redis. Use those before adding more tools.
- Pick one page cache. Install a well-supported caching plugin only if your host does not offer a cache, and disable any overlapping features.
- Set exclusions. Exclude the cart, checkout, account pages and any URLs with dynamic content.
- Enable compression and browser caching headers.
- Add an object cache if your site is dynamic, such as a store or membership site.
- Test as a logged-out visitor in a private window, and test key actions such as forms, login and checkout.
Common Caching Problems
- Changes not showing up. Purge the cache after editing templates or theme settings. Good setups clear the cache automatically when you update content.
- Broken forms or nonces. Pages with forms that include security tokens can break if cached for too long. Shorten the cache lifetime or exclude them.
- Wrong content shown to the wrong person. This means a personalized page was cached. Add it to your exclusions immediately.
- Minification breaking the layout. Aggressive CSS and JavaScript optimization is a separate feature from caching. Turn it on one option at a time.
How to Tell It Is Working
Open your browser’s developer tools, load a page and check the response headers. Many caches add a header showing a hit or a miss. You can also compare the server response time, or TTFB, of a cached and an uncached request. If a cached page still takes a long time to respond, the problem is likely elsewhere. I explain how to check that in Is your hosting slow? How to check TTFB.
Caching done right is invisible to your visitors and obvious in your numbers. If you would like a setup that is tested against your forms, store and logged-in areas, ask for a free audit.

