There was a problem loading the comments.

LiteSpeed Cache Crawler: Set Up, Tune and Troubleshoot

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

The LiteSpeed Cache crawler visits the URLs in a site's XML sitemap on a schedule so LiteSpeed builds a cached copy of each page before a real visitor asks for it. Without it, the first visitor after a purge or a cache expiry gets the slow, uncached page. To use the LiteSpeed Cache crawler, enter a sitemap URL in LiteSpeed Cache > Crawler > Settings and turn it on. This guide covers that, plus how to tune it and how to tell whether it's working.

The steps match LiteSpeed Cache 7.x. Version 7.0 removed several crawler settings, so older guides you find online may show options you won't see. See Older guides show settings you can't find below.

What the LiteSpeed Cache crawler does

LiteSpeed caches a page the first time someone requests it. Every page is slow once: after a purge, after the cache expires, and after you publish changes. On a busy site, visitors absorb that cost and you never notice. On a site with hundreds of pages and modest traffic, most visits to deep pages can land on an uncached copy.

The crawler absorbs that cost instead. It reads the sitemap, requests each URL the way a visitor would, and LiteSpeed caches the response. It runs from WP-Cron, in short batches, and it backs off when the server is busy.

It does not make an uncacheable page cacheable. Cart, checkout, account pages and anything else that sends a no-cache header are skipped and listed on the crawler's Blocklist.

Should you turn it on?

Turn it on when:

  • The site has many pages that each get little traffic, such as a large blog, a directory, or a catalog.
  • Pages are purged often (frequent publishing, or plugins that purge on every save), so a cold cache is common.
  • You care about fast first loads on pages that search engines and ad campaigns send people to.

Leave it off when:

  • The site is small or gets steady traffic. Visitors already keep the cache warm.
  • It's a staging or development site. There's nothing to warm, and you're purging constantly anyway. See How to create Development Sites.
  • The site is a large WooCommerce store with thousands of product and variation URLs. The crawl takes a long time and uses CPU the store needs for checkout. Crawl a smaller sitemap instead (see Crawl only the pages that matter below).

The crawler uses the same CPU and PHP workers as the site. It is a trade: server work now, so visitors don't wait later.

The crawler is enabled on WP Aligned servers

LiteSpeed Enterprise lets the host decide whether WordPress sites on a server may run the crawler. On WP Aligned hosting it's enabled on every server, so you only need to set it up in the plugin.

If the Summary tab at LiteSpeed Cache > Crawler ever shows this warning on one of our servers, open a ticket and include the site's domain:

The crawler feature is not enabled on the LiteSpeed server. Please consult your server admin or hosting provider.

Set up the LiteSpeed Cache crawler

1. Find the sitemap URL

The crawler needs an XML sitemap or sitemap index. Open the one your site already has in a browser to confirm it loads:

Sitemap source Usual URL
WordPress core (no SEO plugin) https://example.com/wp-sitemap.xml
Yoast SEO https://example.com/sitemap_index.xml
Rank Math https://example.com/sitemap_index.xml
All in One SEO https://example.com/sitemap.xml

A sitemap index is fine. The crawler follows it into the child sitemaps.

2. Enter the sitemap and turn the crawler on

  1. Go to LiteSpeed Cache > Crawler and open the Settings tab.
  2. In Custom Sitemap, paste the full sitemap URL. You can add more than one, one per line.
  3. Set Crawler to ON.
  4. Click Save Changes.

LiteSpeed Cache Crawler Settings tab with the Crawler switch set to ON and a sitemap URL in the Custom Sitemap field, both highlighted

Custom Sitemap is required. If it's empty, the Summary tab says You need to set the Custom Sitemap in Settings first before using the crawler and the Manually run button stays disabled.

3. Leave the load limit alone at first

The other settings on that tab:

  • Crawl Interval: how long the crawler waits after finishing the whole sitemap before it starts over. The default is 302400 seconds (3.5 days).
  • Server Load Limit: the highest server load the crawler will tolerate. The default is 1. The crawler uses up to 3 threads, drops threads when load goes above this limit, and stops the run if it can't get under the limit with one thread.
  • Role Simulation and Cookie Simulation: covered under Crawl as logged-in users or for cookie variations below. Leave them empty unless you need them.

Don't raise Server Load Limit to make the crawler go faster. That limit is what keeps the crawler from slowing down the site it's trying to speed up, and the site shares its server with other sites.

4. Run it once by hand

  1. Open the Summary tab.
  2. Click Manually run.
  3. Watch Last crawled and the status column on the crawler row.

A manual run uses the same batch limits as the scheduled one, so on a large site the first full pass takes several runs. After that, WP-Cron starts a new batch every 10 minutes until the sitemap is done, then waits for the Crawl Interval.

5. Set up a server cron job (recommended)

The crawler is scheduled by WP-Cron, and WP-Cron only runs when someone loads a page. Our servers don't run a cron job for WordPress on your behalf, so on a quiet site the crawler can sit idle for hours, which is exactly when it's supposed to be warming pages. We recommend you set up a server cron job for every site that uses the crawler. It takes about five minutes in cPanel.

Verify the crawler is warming pages

Check the Map tab

LiteSpeed Cache > Crawler > Map lists every URL the crawler read from the sitemap. The colored badge in the Crawler Status column shows the result of the last visit:

  • Green, Cache Hit: the page was already cached when the crawler arrived.
  • Blue, Cache Miss: the crawler built the cached copy. This is the crawler doing its job.
  • Red, Blocklisted: the page told LiteSpeed not to cache it, so the crawler will skip it from now on.
  • Gray, Waiting to be Crawled: not visited yet.

LiteSpeed Cache Crawler Map tab partway through a crawl: the home page crawled (blue), two pages already cached (green), and four pages still waiting (gray)

The crawler works in batches, so on a first run it's normal to see gray rows. They fill in over the next few runs.

If you changed the sitemap, click Refresh Crawler Map so the crawler reads it again.

Check a page from the command line

Pick a URL the Map tab shows as crawled. Purge nothing, stay logged out, and request it:

curl -sI https://example.com/some-page/ | grep -i x-litespeed-cache

x-litespeed-cache: hit on the very first request you make means the crawler warmed it. miss means it wasn't cached yet, or the cached copy was purged since the crawler's visit.

Crawl only the pages that matter

On a big site, a full crawl can take days and spend most of its time on pages nobody visits. Point the crawler at a smaller sitemap instead:

Enter each sitemap on its own line in Custom Sitemap, save, then click Refresh Crawler Map on the Map tab.

Crawl as logged-in users or for cookie variations

Every extra variation multiplies the work. The crawler builds one crawler per combination of guest or role, mobile or desktop (when mobile cache is on), next-gen image support (when WebP or AVIF replacement is on), and each cookie value. Each crawler walks the whole sitemap. Add variations only when real visitors need them.

Role Simulation crawls as a logged-in user, which only helps if you cache pages for logged-in users (private cache with ESI). It needs two things first:

  1. LiteSpeed Cache > Cache > ESI: set Enable ESI to ON.
  2. LiteSpeed Cache > General > General Settings: fill in Server IP with the site's server IP.

Then enter a user ID in Role Simulation. Use a dedicated low-privilege account with the role you want to warm, never an administrator.

Cookie Simulation crawls once per cookie value, for sites that vary pages by a cookie such as a currency or language switcher. Enter the cookie name and its values, one per line. Use _null as a value to also crawl the version where the cookie isn't set.

Troubleshoot a crawler that won't run

The Manually run button is disabled

Either Custom Sitemap is empty, or the server-level warning is showing (see The crawler is enabled on WP Aligned servers above).

"No valid sitemap parsed for crawler."

The crawler couldn't read any URLs from the sitemap. Check that:

  • The URL opens in a browser and shows XML, not a 404 or a login page.
  • The site isn't password-protected or behind a "coming soon" plugin that blocks anonymous requests.
  • The URLs inside the sitemap use the site's own domain. The crawler drops URLs on other domains.

Then click Refresh Crawler Map.

The crawler starts but stops almost at once

Look at Ended reason on the Summary tab. If it says stopped_highload, the crawler backed off because the server was busy. That is the load limit working. It will try again on the next run.

If the scheduled runs never start, check WP-Cron. The crawler is a WP-Cron job, and WP-Cron only fires when the site gets a page load, unless a server cron job calls it. If DISABLE_WP_CRON is set to true in wp-config.php and no server cron job is set up, the crawler never runs on its own. To fix both cases, set up a server cron job.

Most pages end up Blocklisted

Pages are blocklisted when they send a no-cache header or no LiteSpeed cache header at all. Some of that is correct (cart, checkout, account). If normal content pages are blocklisted:

  1. Check the page's cache status logged out with the curl command above. If it never shows hit, the page isn't cacheable, and the crawler can't change that. Look for an exclusion in LiteSpeed Cache > Cache > Excludes, or a plugin that sends no-cache.
  2. Once you've fixed the cause, go to the Blocklist tab and click Empty blocklist so the crawler tries those pages again.

Older guides show settings you can't find

LiteSpeed Cache 7.0 removed Delay, Run Duration, Interval Between Runs, Threads, Timeout and Drop Domain from Sitemap from the dashboard. Everything left is on one Settings tab under LiteSpeed Cache > Crawler. The removed values are now fixed in the plugin. If a guide tells you to raise threads or shorten the delay, skip it: those knobs aren't in the dashboard anymore, and on shared servers the load limit is the right control.

Prevent problems

  • Run one cache warmer. If the site also has a "preload" feature in another plugin, or an external warm-up service, turn it off. Two warmers double the server work for no gain.
  • Keep the sitemap clean. Remove noindex and thin pages from it in your SEO plugin, and the crawler skips them too.
  • Don't enable Role or Cookie Simulation "just in case." Each one multiplies the crawl.
  • After a big purge (a theme change or Purge All), let the crawler rebuild over time. You don't need to run it by hand.

When to contact us

Open a ticket if:

  • The Summary tab shows The crawler feature is not enabled on the LiteSpeed server.
  • The crawler runs but curl never shows x-litespeed-cache: hit on pages the Map tab says it crawled.
  • You want to crawl a large site and aren't sure the server can take it.

Include the site's domain and a screenshot of the Crawler Summary tab. See Need Help? for how to reach us.

FAQ

Does the crawler purge the cache?

No. It only fills it. To clear the cache, see How to Clear LiteSpeed Cache on WP Aligned Hosting.

Does the crawler warm the Redis object cache?

Not directly. It requests pages, and if Redis is on, those requests fill it as a side effect. Redis is off by default on our hosting. See Redis Object Caching.

Will the crawler show up in analytics?

Server-side tools that read access logs will see the crawler's requests. Its user agent contains lscache_walker or lscache_runner, so you can filter it out. JavaScript-based analytics such as Google Analytics don't record it, because the crawler doesn't run JavaScript.

How long does a full crawl take?

It depends on the number of URLs, the number of crawler variations, and how busy the server is. The Summary tab shows Last complete run time for all crawlers once one full pass has finished.


Share via
Did you find this article useful?  

Related Articles