Best xSpeed Cache Settings for a Blog
A blog is the easy case for a caching plugin. Every visitor who isn’t logged in sees the same page, so nearly every page can be served from cache, and the settings that are risky on a store are mostly safe here. This post gives one value for every xSpeed Cache setting on a blog or content site, in the order we’d turn them on, with what to check after each. The same values, side by side with a WooCommerce store, are on Recommended settings.
Before you start, run one speed test on your home page and one on a typical post, and write down the TTFB and LCP. You’ll want those numbers at the end.
Step 1: Run the setup wizard on Balanced
The setup wizard on Balanced does most of the work in one click:
- page cache on, with a 168-hour (7-day) expiry
- GZIP and browser cache on
- Minify HTML and Minify CSS on
- lazy-loading for images
- early hints for the main image and Google Fonts
It leaves JavaScript alone, which is the right call for a first pass. If you’re on nginx, add the server snippet the wizard shows. It’s a one-time paste, and it’s what lets nginx hand out cached pages without starting PHP at all.
Check: open the home page and a post in a private window. Nothing should look different, only faster.
Step 2: Keep the 168-hour cache expiry
A blog doesn’t need a short expiry. Publishing or updating a post clears that post’s cached page, so readers see the change straight away. The expiry only decides how long an untouched page stays cached, and a week is fine for content that rarely changes.
Turn on the Preloader and set it to Daily. It visits every page in your sitemap and caches it before a reader asks. Warm new content immediately is on by default, so a new post is cached the moment you publish it.
Step 3: Turn on the object cache
The page cache only helps visitors who aren’t logged in. You, your editors and anyone leaving a comment still get pages built from scratch, and wp-admin always is. An object cache keeps the results of database queries in memory (Redis or Memcached), so those requests get quicker too. If your host offers Redis, turn it on under Object Cache. Setting up Redis for WordPress walks through it.
Step 4: JavaScript, one setting at a time
This is where the biggest front-end wins are, and where something can break. Turn these on one at a time, checking a post and the home page after each:
- Minify JavaScript. Rarely breaks anything on a blog.
- Defer JavaScript. jQuery stays excluded by default, which is what most themes rely on.
- Delay JavaScript. Scripts wait until the reader scrolls, taps or types. This usually gives the biggest jump in a mobile score.
Delay JavaScript is the one to watch. Check your menu opens on a phone, any slider moves on its own, and your forms still submit. If something waits until you touch the page, add part of its script name or address to Scripts to never defer or delay. Delay JavaScript broke my menu shows how to find it. Cookie-consent banners need nothing: xSpeed already loads them straight away.
Leave Combine CSS and Combine JavaScript off. On HTTP/2 and HTTP/3, which almost every host serves, combining makes no first visit faster, and every returning reader re-downloads the whole bundle after any change.
Step 5: Images
Lazy-loading is already on from the wizard. Two settings matter for a blog:
- Images to load right away stays at 1. That’s the image at the top of the post, usually what Google measures as LCP, so it should never wait.
- If your logo comes before the post image, add the logo’s file name to Excluded images, so the logo isn’t lazy-loaded either.
Preload the main image is on by default and tells the browser to fetch the top image first. If it picks the wrong image on post pages, the hero image guide shows how to name the right one with a Main image rules line such as post | featured.
Step 6: Leave the rest on their defaults
- Separate mobile cache: off. A responsive theme sends phones and computers the same page. Turning this on only doubles the cache, and on nginx and Apache it stops the server handing out cached pages directly.
- Heartbeat: defaults. The dashboard and editor are already slowed to one check a minute, and it’s off on the public site.
- Load CSS without blocking: only acts on pages that have Critical CSS, an xSpeed Pro feature. On the free plugin, leave it off.
Step 7: Clean the database once a month
Under Tools › Database, set Automatic cleanup to Monthly. Then tick what it should clean, because a schedule cleans nothing until you do. A safe set is Expired Transients, Spam Comments, Orphan Post Meta and Orphan Comment Meta. Clean revisions by hand when you choose to, and turn on Limit post revisions so they stop piling up.
The settings in one table
| Setting | Blog value |
|---|---|
| Page cache | On |
| Cache expiry | 168 hours |
| Preloader | On, daily |
| Browser cache, GZIP | On |
| Object cache | On (Redis) |
| Minify HTML / CSS / JavaScript | On, JavaScript after a check |
| Combine CSS / JavaScript | Off |
| Defer JavaScript | On |
| Delay JavaScript | On, menu/slider scripts excluded if needed |
| Lazy load | On, first image loads right away |
| Separate mobile cache | Off |
| Heartbeat | Defaults |
| Database cleanup | Monthly, items ticked |
Check the result
Run the same two speed tests again. On a cached blog page, TTFB should drop to tens of milliseconds, because the page no longer waits for PHP and the database. LCP should improve most after Step 4. If a number got worse, the last setting you changed is the first suspect.
Running a store as well? Best xSpeed Cache settings for WooCommerce covers what changes when there’s a cart and a checkout.
Frequently asked questions
What is the best cache expiry for a WordPress blog?
The 168-hour default. Publishing or updating a post clears its page, so a long expiry doesn’t leave readers on old content. A shorter expiry only makes pages rebuild more often for no benefit.
Should I turn on Delay JavaScript on a blog?
Yes, after Minify and Defer, and with a check of your menu, sliders and forms. It’s the setting most likely to lift a mobile score, and the one most likely to need an exclusion.
Do I need a separate mobile cache?
Not with a responsive theme. Turn it on only if your theme or a plugin sends phones a different page from computers.
Should I combine CSS and JavaScript files?
No. On HTTP/2 and HTTP/3, separate files load in parallel, and a combined file has to be downloaded again in full after any change.