Site icon Impact Digital

WordPress Caching for Small Sites: Layers, Settings, Testing

Diagram of caching layers between a visitor and a WordPress server

This guide is for bloggers, small business owners and agency staff who run WordPress sites and keep hearing that they “need a caching plugin.” Caching is not one switch. It is several layers, and your host may already handle some of them. Below you will find what each layer does, how to check what is already running, how to pick a plugin by criteria, which settings are safe to start with, and how to test after every change.

The five caching layers in plain terms

The WordPress developer documentation on optimization groups caching into several types. Here they are side by side, with where each one lives.

LayerWhat it storesWhere it lives
Page cacheFinished pages saved as static files, so the server skips most PHP and database workA plugin, the host’s server software, or a CDN
Browser cacheImages, CSS and JavaScript kept on the visitor’s deviceThe visitor’s browser, controlled by your response headers
Object cacheResults of database lookups, such as site optionsServer memory; persistent only if a cache server and plugin are set up
CDN or edge cacheStatic files, and on some services whole HTML pagesThe CDN’s servers around the world
Opcode cacheCompiled PHP codeThe PHP engine on your server (for example OPcache)

Page cache

The WordPress documentation says caching plugins store posts and pages as static files that are served to users, which reduces server processing. It describes the gain for fairly static pages as potentially “several hundred times over,” and notes that sites with a lot of dynamic content need more complex configuration.

Browser cache

Browser caching is controlled by HTTP headers. MDN explains that Cache-Control: max-age sets how long a response counts as fresh, and that a stale file can be revalidated with an ETag, so the server answers “304 Not Modified” instead of resending the file. web.dev recommends a one-year max-age for versioned files whose URL changes when the content changes, and it warns that leaving out Cache-Control does not switch caching off, because browsers then guess.

Object cache

WordPress has an object cache built in, but the developer reference says it is non-persistent by default: data lasts only for the current request. A persistent object cache keeps data such as site options between requests so WordPress makes fewer database trips. The optimization handbook says this needs a cache server that your hosting provider offers, plus a plugin that supports it.

CDN or edge cache

The handbook says a CDN offloads images, JavaScript, CSS and theme files, and works best alongside a caching plugin. It adds that some newer CDNs offer full page or edge caching of a site’s entire HTML. If you are weighing a move, see our checklist on moving to a CDN without hurting Googlebot crawling.

Opcode cache

The handbook says opcode caches such as APC and OPcache can dramatically improve the performance of PHP files. This layer is normally configured by the host, not by a WordPress plugin, so your job is usually just to ask whether it is enabled.

Check whether your host already caches pages

Stacking two page caches can cause stale pages and confusing behavior, so find out what you already have before installing anything.

  1. Open Site Health. In the dashboard go to Tools > Site Health > Status. WordPress 6.1 added a page cache check that looks for a full page cache and measures server response time. According to the WordPress core announcement, the default response-time threshold is 600ms, and the check runs only in production environments. The announcement does not list every header it inspects, so treat a negative result as a prompt to investigate.
  2. Read the response headers. In your browser’s developer tools, open the Network tab, reload a public page and click the first request. Look for cache-related headers. The core announcement mentions cf-cache-status (with a value of “hit”) as one example hosts can register, and MDN says shared caches report an Age header.
  3. Look at the hosting panel. Many hosts have a caching toggle or a built-in cache tool. Check its documentation or ask support directly: “Do you run a server-level page cache, and does it bypass logged-in users and shopping pages?”

If your host does not cache pages, a plugin is a reasonable choice. For slow sites more generally, our guide on how to speed up your WordPress website covers the other levers, and choosing a hosting plan matters if your current host offers no caching.

Choose a caching plugin by criteria, not brand

The handbook suggests finding options by searching “cache” in the plugin directory. Rather than picking whichever name is most popular, check each candidate against this list on its wordpress.org page:

As one example of reading a listing this way, the wordpress.org page for WP Super Cache says it generates static HTML files that the web server serves instead of running PHP on every request. It describes three serving modes, recommends the “Simple” mode that needs no server-file changes, calls the “Expert” mode riskier, and recommends not caching pages for known users. This is an illustration, not a recommendation.

Safe settings to start with

What to exclude from caching

Anything that differs per visitor must stay dynamic. The WooCommerce developer documentation says the Cart, Checkout and My Account pages should be excluded using your caching system’s settings, because they show information specific to each customer. It adds that some caching plugins already do this by default, and that if your caching system offers database caching, you should consider excluding the _wc_session_ entry. It also says a password reset that loops back to the login screen may mean the host is caching My Account.

The same logic applies to membership, course and other account pages.

Test and clear cache after changes

Cached pages do not reflect edits until the cache is cleared or expires, so build a short routine. If you test changes on a copy first, our guide to using a WordPress staging site before you update fits well here.

  1. Change one setting, then clear the plugin’s cache (and the host’s cache, if it has one).
  2. Open a private or incognito window and visit the page as a logged-out visitor. Check that the edit appears.
  3. Compare two loads. MDN says a normal reload revalidates with the server, while a force reload bypasses the cache.
  4. Log in and test the account, cart and checkout paths. Place a test order or password reset if you run a shop.
  5. Re-run Site Health and a PageSpeed Insights report, and compare against your earlier numbers.

Clear cache after theme or plugin updates, design changes, and changes to menus or widgets. If a CDN caches HTML, MDN notes that long-term HTML caching generally needs a managed cache that can be purged when content changes, so purge there too.

Key takeaways

FAQ

Do I need a caching plugin if my host offers caching?

Usually not for page caching. Confirm what the host’s cache covers, then avoid enabling a second page cache. A plugin may still be useful for other features, with its own page caching turned off.

Is a persistent object cache necessary for a small site?

Not by default. It needs a cache server from your host and a compatible plugin, and Site Health only suggests it when site metrics indicate it would help.

Why do I still see old content after publishing a change?

One of the layers is likely serving a stored copy. Clear the plugin cache, the host cache and any CDN cache, then reload in a private window.

What is the difference between no-cache and no-store?

Per MDN and web.dev, no-cache lets a response be stored but requires revalidation before reuse, while no-store tells caches not to store it at all.

Sources

Exit mobile version