RevealTheme logo
Back to Blog

Migrating from WP Rocket to LiteSpeed Cache

Migrating from WP Rocket to LiteSpeed Cache
The RevealTheme Team

By

·

WP Rocket and LiteSpeed Cache solve the same problem from opposite ends of the stack. WP Rocket is a PHP plugin that builds a page cache in your wp-content folder and runs on any host. LiteSpeed Cache (LSCache) hooks into a LiteSpeed web server and caches pages at the server level, before PHP even wakes up. Migrating between them is not like swapping two interchangeable plugins — it is a move from application-layer caching to server-layer caching, and whether it makes sense depends entirely on one thing you must check first.

Before you touch anything: are you actually on LiteSpeed?

This is the gate. LSCache's full-page cache only works on a LiteSpeed web server — either OpenLiteSpeed (free, open source) or LiteSpeed Enterprise. If your host runs Nginx or Apache, installing LiteSpeed Cache gives you a degraded plugin that falls back to slower PHP-level or object caching and loses the entire reason you'd migrate. In that case, stay on WP Rocket.

Confirm your server before doing anything else. The fastest check is the HTTP response headers — run your homepage through a header inspector or open your browser dev tools Network tab and look at the document request. A LiteSpeed host returns a Server: LiteSpeed header, and once the cache plugin is active you'll see x-litespeed-cache: hit or miss. By host: Hostinger, NameHero, A2 Hosting, ChemiCloud, and many cPanel/CloudLinux shared hosts run LiteSpeed. Kinsta, WP Engine, Cloudways (Nginx/Apache stacks), and SiteGround do not. If you're not on LiteSpeed and don't plan to move hosts, close this tab — the migration buys you nothing.

Why migrate at all?

Assuming you are on LiteSpeed, the case is real:

  • Lower TTFB. Server-level caching serves the cached HTML without bootstrapping WordPress or PHP, which typically shaves time off Time To First Byte versus a PHP-based cache. A healthy TTFB target is under ~200ms; LSCache makes that easier to hit on shared hosting.
  • It's free. LiteSpeed Cache is a free plugin. WP Rocket is ~$59/year per site. If your host already runs LiteSpeed, you're paying for caching you could get natively.
  • ESI (Edge Side Includes). LSCache can cache a page while keeping a dynamic fragment — a cart total, a "Hi, username" greeting — uncached and assembled separately. WP Rocket has no equivalent; it simply excludes such pages from caching. For WooCommerce or membership sites this is a genuine capability gap.
  • QUIC.cloud integration. LiteSpeed's companion service handles image optimization, CDN, and Critical CSS generation, with a free monthly quota that is larger for sites on LiteSpeed servers.

The cardinal rule: never run both at once

Two full-page caches fighting over the same requests produces stale pages, doubled minification, and broken assets. Deactivate WP Rocket completely before activating LiteSpeed Cache. Do not just "turn off caching" in WP Rocket — deactivate the plugin.

WP Rocket leaves drop-ins and config behind that LSCache will trip over. After deactivating, verify these are gone:

  1. wp-content/advanced-cache.php — WP Rocket's cache drop-in. LiteSpeed installs its own; a leftover WP Rocket one will conflict.
  2. The define('WP_CACHE', true); line in wp-config.php — harmless to keep but worth checking it points at nothing stale.
  3. WP Rocket's block in .htaccess (between its # BEGIN WP Rocket markers).
  4. The wp-content/cache/wp-rocket/ folder.

WP Rocket's own deactivation routine removes most of this automatically, but on hosts with restrictive file permissions it sometimes can't. Check via your host's file manager or SFTP. Clearing these by hand takes two minutes and prevents the most common post-migration "why is the cache not working" headache.

Mapping your settings across

You configured WP Rocket deliberately, so don't start LiteSpeed from zero — translate. The features map cleanly even though the menus are named differently:

  • File Optimization (CSS/JS minify, combine) → LiteSpeed's Page Optimization tab, under CSS Settings and JS Settings.
  • Lazy load images/iframesPage Optimization → Media Settings.
  • Preload / sitemap preloadCache → Crawler. Note: the LiteSpeed crawler is disabled by default on shared hosts and often must be enabled by your host, so preloading may not work out of the box.
  • Database cleanupDatabase tab (DB Optimizer).
  • Heartbeat controlToolbox → Heartbeat.
  • RocketCDNCDN → QUIC.cloud CDN. (RocketCDN, ~$7.99/month, doesn't follow you; QUIC.cloud is the LiteSpeed-native replacement.)

Where identical settings produce different results

This is the part that catches people. LiteSpeed's CSS/JS combine and especially its Critical CSS plus "Load CSS Asynchronously" are more aggressive than WP Rocket's defaults. Flipping on the equivalent toggles can produce a flash of unstyled content, broken sliders, or mangled menus that WP Rocket never caused on the same theme.

So don't bulk-enable. Turn optimizations on one at a time, clearing the cache and reloading after each:

  1. Enable basic page cache first. Confirm x-litespeed-cache: hit appears in headers on a second load.
  2. Add CSS/JS minify. Re-test the homepage and one inner page.
  3. Then CSS/JS combine, then Critical CSS / async CSS — the riskiest, so save them for last.
  4. Test the pages most likely to break: anything with a slider, an animated header, a contact form, or your checkout.

Build an exclusion list as you go. Any script that breaks goes into LiteSpeed's JS Excludes rather than abandoning combine entirely.

Verify, then watch

After the migration, confirm three things. First, headers show x-litespeed-cache: hit on cached pages — that proves server-level caching is live, not the PHP fallback. Second, your Core Web Vitals haven't regressed: re-run PageSpeed Insights and check LCP stays under 2.5s, CLS under 0.1, and INP under 200ms. Aggressive CSS deferral can hurt LCP even while it improves the overall score, so look at the field data, not just the lab number. Third, log out and browse as a visitor — caching bugs love to hide from logged-in admins, who are served uncached pages by default.

Keep WP Rocket installed-but-deactivated for a week rather than deleting it immediately. If LiteSpeed's combine breaks something you can't quickly exclude, reactivating WP Rocket (after deactivating LSCache) gets you back to a known-good state in seconds. Once you've gone a week without a fire, delete WP Rocket, cancel the renewal, and you're done — caching natively, at the server level, for free.