Category: LSCache

Learn more about LiteSpeed Cache plugin for WordPress, PrestaShop, XenForo, Drupal, Joomla, MediaWiki, WooCommerce, and more. Sites powered by LiteSpeed Web Server with LSCache may accelerate their web apps with extensions or rewrite rules.

In this category you will find tutorials, case studies, and useful information related to this popular cache solution.

  • WpW: The Beginner’s Guide to LiteSpeed Cache for WordPress

    WpW: The Beginner’s Guide to LiteSpeed Cache for WordPress

    WordPress Wednesday: Beginner's Guide to LiteSpeed Cache for WordPress

    Welcome to another installment of WordPress Wednesday!
    Today’s Topic: Beginner’s Guide to LiteSpeed Cache for WordPress

    Disclaimer: The information contained in this post is accurate for LSCWP v5.5 [release log]. If you are using a newer version of the plugin, some details may have changed. Please refer to our documentation for the latest!

    So you’ve downloaded the LiteSpeed Cache for WordPress plugin, installed it, and activated it. Now what?

    Some people are invigorated by the site of all of those settings tabs and are eager to jump right in, while others find all of the options overwhelming, and are paralyzed with indecision.

    Well, if you are part of the latter camp, you’ve come to the right place. Today we are going to talk about setting up LSCWP simply and easily. We’ll go over the things you must know in order to successfully use the plugin, and tell you which settings you can safely ignore.

    I’ve installed and activated LSCache for WordPress. Now what?

    Beginner's Guide to LiteSpeed Cache for WordPress

    LSCWP essentially has two purposes: that of a full-page cache for your site’s dynamically-generated pages, and that of a site-optimization plugin. Most people who install LSCache do so for the caching functions, and the rest is just the icing on the cake.

    You are free to enable the caching functions and ignore everything else.

    Upon activation, you’ll find that caching is enabled, but everything else is disabled. If you navigate to LiteSpeed Cache > Cache > Cache you will see that Enable Cache is set to ON.

    You could stop right there, never configure another setting, and the plugin would probably cache your site very nicely. We specifically chose the default settings to work with the majority of sites right out of the box.

    TL;DR: This is a very long post, but that’s only because I set out to explain every single basic setting for you. In the event that you want to tweak things a bit, it doesn’t hurt to have a rudimentary understanding of these things. There’s no need to read it now, though! Use the default settings, bookmark the version of this post that exists in the documentation (which we will keep updated through each plugin version), and check it when you need the reference.

    Still reading? Ok! Let’s look at the first four tabs in the Cache section, and see what they do. These are the most basic settings for your cache.

    Beginner’s Guide to LiteSpeed Cache for WordPress

    LiteSpeed Cache for WordPress Basic Cache Tabs

    Tip: This is a high-level overview. For a detailed explanations of each setting on each tab of the Cache section, please see the Screen-by-Screen documentation.

    Cache Tab

    The first option on the Cache tab turns the caching functionality on and off. The remaining settings allow you to decide what types of content will be cached. By default, everything is enabled. If you don’t know what these settings do, it’s best to leave them set to their defaults.

    TTL Tab

    TTL stands for “Time to Live” and it refers to the number of seconds a page can remain in cache before it is considered stale. Once a page reaches its TTL, it is purged from cache. We’ve chosen default TTLs that should work for most sites, but you are free to change them.

    If you would like a deeper understanding of how content is cached and purged, take a look at this blog post. It’s written at a high-level, so you can get the gist without knowing a lot of jargon.

    Purge Tab

    There are sometimes situations where pages should be purged before their natural expiration. This section allows you to define the rules for that behavior. The default selections should work for most sites, but you can change them if you need to.

    Example

    If you write a new post, tag it “brownies,” and publish it in the “recipes” category, several pages will change: the home page, the recipes category archive page, the brownies tag archive page, your author archive page, and probably some other pages, depending on your theme.

    All of the affected pages will need to be purged in order to avoid serving stale content. These settings give you an opportunity to adjust the rules to fit what is needed by your site.

    Excludes Tab

    You may have pages that you don’t want cached at all. These options allow you to exclude specific parts of your site from being cached. Again, for most sites, there will be no need to change these settings. They are provided to allow you to make custom exceptions to the cache rules.

    The Other Cache Tabs

    The rest of the Cache tabs (four or five, depending on whether you have WooCommerce enabled) cover more advanced types of caching. We cover these in-depth in the Screen-by-Screen Cache section documentation.

    LiteSpeed Cache for WordPress Other Cache Tabs

    ESI

    “Edge Side Includes” (ESI) is a method through which you can “punch holes” in public content, and fill them with private or uncached content. ESI is useful for things like shopping cart widgets and personalized greetings, but we’ve left it disabled by default. Go in-depth here.

    Object

    The settings on this tab allow you to control an external object cache (Memcached, LSMCD, or Redis). The server admin needs to have previously enabled and configured this external cache.

    Browser

    Browser cache is a client-level cache for static files. With browser caching enabled, static files (like images) are stored locally on the user’s device the first time they are requested. After that, the content is pulled from their local storage until the browser cache expires. The settings on this tab control the browser cache.

    Advanced

    As you might guess from the name of this tab, it’s aimed at more experienced users. You are not likely to need this tab, unless you have some kind of conflict with another cache plugin.

    WooCommerce

    LSCache is compatible with WooCommerce. If you have WooCommerce enabled, this tab will appear, and will allow you to configure settings related to caching shop content.

    Other Plugin Sections

    There are many more sections to explore in the LSCache plugin. Each of these is documented in much greater detail in the docs Screen-by-Screen section. I’ve provided links to each section in the descriptions below.

    LiteSpeed Cache for WordPress Menu

    Dashboard

    The LiteSpeed Cache Dashboard allows you to see the status of all of your LSCache and QUIC.cloud services (Image Optimization, Critical CSS Generation, Low-Quality Image Placeholders, Cache Crawler, etc.) at a glance. You can also check your page load time and your page speed score. Learn more.

    General

    The settings in this section control your usage of QUIC.cloud services, the ability to auto upgrade the plugin, and which messages you want to have displayed on the dashboard. Learn more.

    CDN

    This section allows you to configure your Content Delivery Network for use with WordPress. If you don’t use a CDN, don’t worry about it. We’ve left CDN support disabled by default. Learn more.

    Image Optimization

    LiteSpeed Cache for WordPress provides the ability to optimize your images, making them smaller, and faster to transmit. This is done through a QUIC.cloud service and can be controlled in this section of the plugin. Learn more.

    Page Optimization

    There are several non-cache measures you can take to speed up your WordPress site, and many of them are supported in this tab. CSS and Javascript minification and combination, HTTP/2 push, asynchronous and deferred load… if you don’t know what these things mean, don’t worry. We’ve left them disabled by default. Learn more.

    Database

    This section allows you to optimize your WordPress database. Database optimization is a useful tool when it comes to speeding up your site. LSCWP’s DB Optimizer gives you an easy way to execute some of these tasks in your WordPress database. Learn more.

    Crawler

    We’ve disabled the crawler by default. When it’s active, it travels your site, refreshing any pages that may have expired from the cache. Crawling can be a resource-intensive process, and not all hosting providers will allow its use. If your hosting provider does allow crawling, it’s a nice way to keep your cache fresh. Learn more.

    Toolbox

    When you need to manually purge the cache, export your site settings, or debug an issue, you’ll find the means in the Toolbox section. Probably the most useful thing you will find here is the Environment Report. If you are having a problem and LiteSpeed support asks for your Report Number, this is where you would go to get it. Learn more.

    Watch the Video

    What now?

    Now, you sit back and watch your site load more quickly 😀

    If you’re feeling adventurous, you can start looking at some of those other features we glossed over. Or, maybe you’d like to try a preset. They’re a great way to kick start your configuration, and they’re available for every comfort level.

    We have documentation that provides explanations of every setting (specific sections are linked to above), and you can explore previous WordPress Wednesday topics for more in-depth discussions of some of them.

    If anything we covered was not clear enough, or you feel the need for additional help, please don’t hesitate to leave a comment here or post on our WordPress support forum. We enthusiastically support this plugin and are happy to answer any of your questions!


    Have some of your own ideas for future WordPress Wednesday topics? Leave us a comment!

    Don’t forget to meet us back here next week for the next installment. In the meantime, here are a few other things you can do:


    This content was last verified and updated in June of 2023. If you find an inaccuracy, please let us know! In the meantime, see our documentation site for the most up-to-date information.

  • LiteSpeed Web Server or OpenLiteSpeed?

    LiteSpeed Web Server or OpenLiteSpeed?

    LiteSpeed Enterprise or OpenLiteSpeed for WordPress

    You’ve heard about how LiteSpeed Cache can significantly improve your WordPress site’s performance, but there is more than one way to get LiteSpeed Cache. How do you know which option is best for you? Let’s answer that question by taking a closer look at our two web server options: OpenLiteSpeed and LiteSpeed Enterprise.

    Simply put, if you are already an OpenLiteSpeed (OLS) user, or a LiteSpeed Web Server (LSWS) user, and your current choice is working for you, then there is no need to switch. The LiteSpeed Cache Plugin for WordPress (LSCWP) works with either OLS or LSWS to speed up your site.

    But what if you have not yet decided which LiteSpeed server to use? Let’s look at a few common scenarios, and see which web server is best for each.

    If you are… You should use…
    a VPS user with simple non-ecommerce sites OpenLiteSpeed
    running a WooCommerce (or similar eCommerce plugin) site LiteSpeed Enterprise
    more comfortable with Managed WP hosting and full Apache compatibility LiteSpeed Enterprise

    Need more help making a choice? Read on!

    Similarities Between Servers

    Both LiteSpeed servers run on Linux and FreeBSD, and share an impressive list of basic features, including:

    • Support for both common and cutting-edge Internet protocols: HTTP / SPDY / HTTP/2 / QUIC / HTTP/3
    • IPv4 and IPv6 support
    • Language support: PHP, Perl, Ruby, Python, NodeJS, JSP, etc.
    • SAPIs: LiteSpeed API, CGI, FCGI, AJPv13, Proxy
    • Unlimited virtual hosting, both IP-based and name-based
    • Gzip and Brotli compression
    • WebSocket Proxy
    • TLS v1.3
    • CloudLinux CL LVE support

    OLS and LSWS both have the ability to understand Apache rewrite rules, configuration files, and ModSecurity, making it easy to switch from Apache to LiteSpeed. Both servers share an event-driven architecture, comprehensive security options, high availability and many more features, which are listed in full on our website.

    LiteSpeed Cache for WordPress (LSCWP) plugin is supported by both servers. LSCWP has earned a 5-star reputation for good reason. And while the optimization features of the LiteSpeed Cache plugin can, technically, be used with any server (LiteSpeed, Apache, nginx, etc.), the caching features, which are LiteSpeed exclusive, can only be used with a LiteSpeed server product.

    So, how do you choose? Let’s take a closer look at the differences between OpenLiteSpeed and LiteSpeed Enterprise.

    OpenLiteSpeed

    Use OpenLiteSpeed for WordPress

    OpenLiteSpeed, our free, open source web server comes with a powerful cache engine, unlimited worker processes, and community support options.

    OLS understands Apache rewrite rules, however a restart is required in order to process any new or changed .htaccess files. For this reason, OLS is most frequently used for individual sites that don’t change often.

    For those who like working with a control panel, OLS is compatible with DirectAdmin and CyberPanel.

    It’s easy to give OpenLiteSpeed a try. One-click images are available in a variety of cloud services, including Digital Ocean, Amazon Web Services, and Google Cloud Platform.

    Visit openlitespeed.org to see all available installation options.

    LiteSpeed Web Server

    Use LiteSpeed Web Server on WordPress

    LiteSpeed Enterprise is a fully-Apache-compatible drop-in-replacement. LSWS autodetects changes to .htaccess and adjusts as necessary without requiring a restart. For this reason, It is ideal for shared hosting environments where updates are frequent.

    LSWS is compatible with any control panel that was written for Apache. This includes cPanel, Plesk, DirectAdmin and more.

    In addition to the extensive security features shared with OpenLiteSpeed, Enterprise also boasts protection from WordPress Brute Force attacks.

    Like OLS, LSWS features a powerful cache engine. But LSWS’s cache engine goes further with ESI support included. ESI, or Edge Side Includes, allows LiteSpeed to cache mixed public and private content on a single page. It’s especially useful in eCommerce situations.

    ESI makes it possible to cache the following:

    • logged-in users
    • non-ajax-based WooCommerce carts
    • widgets with different cache requirements than the rest of the page

    Other caching solutions require you to exclude pages with such content from their caches. LiteSpeed Enterprise with ESI support allows you to cache all of it.

    LSWS is a licensed product with a number of tiers to fit within any budget. The lowest tier, perfect for personal sites and developers, is the Free Starter, which includes the full-featured LSWS Enterprise software and is available for a single domain with a 2GB VPS. It’s 100% free, forever.

    Site Owner tiers start at $10/month for 5 domains on an 8GB VPS, and Web Hosting tiers are available for agencies and hosting providers who need unlimited domains.

    Visit our website to see all of the licensing options.

    You can also get LiteSpeed Enterprise with Jelastic’s PaaS or find a hosting provider who offers LiteSpeed Web Server.

    Other Options

    The whole point of this article is to help you to choose between OpenLiteSpeed and LiteSpeed Enterprise, and so we don’t want to spend a lot of time talking about other options. But we do want you to know that these options exist! So here is just a very brief overview of our CDN and ADC products. Please feel free to explore the links, to learn more about each.

    QUIC.cloud

    Use QUIC.cloud on WordPress

    Even if you know you want to use LiteSpeed, sometimes it is not feasible to switch to a new server, for whatever reason.

    Our QUIC.cloud CDN is a reverse proxy content delivery network, and is the only CDN that interfaces with the LSCache plugin to intelligently cache all of the content on your WordPress site. Learn more about the benefits of QUIC.cloud.

    LiteSpeed Web ADC

    Use LiteSpeed Web ADC on WordPress

    If you’re managing a clustered environment, consider LiteSpeed Web ADC.

    Our ADC is an affordable, high-performance HTTP load balancer application. Even if your backend servers are not LiteSpeed servers, with LiteSpeed Web ADC on the front end, you can interface with the LSCache plugin across all WordPress sites in the cluster. Learn more about LiteSpeed Web ADC.

    Conclusion

    LiteSpeed’s web server editions share an impressive selection of cutting edge features in common, and you can explore them more fully on our website. However, as we’ve seen, there are some differences between OLS and LSWS, and each server caters to a different audience.

    We hope you now have a better idea of which LiteSpeed server will work for you. If you still have questions, don’t hesitate to ask in the comments, or drop by our Slack workspace for the opportunity to chat with other LiteSpeed enthusiasts.

    Happy Caching!


    This content was last verified and updated in August of 2022. If you find an inaccuracy, please let us know! In the meantime, see our documentation site for the most up-to-date information.

  • LiteSpeed Cache vs. W3 Total Cache

    LiteSpeed Cache vs. W3 Total Cache

    LiteSpeed Cache vs W3 Total Cache

    Speeding up your WordPress site requires a page cache. But choosing one can be difficult. There are so many options! Today, we’d like to help you narrow down your choices by comparing LiteSpeed Cache and W3 Total Cache. You’ll learn how each plugin works so that you can decide which is best for your site.

    LiteSpeed Cache vs. W3 Total Cache

    Let’s look at the basic caching functionality of each plugin and see where they are similar and where they are different.

    Page Caching

    Page caching is essential for a WordPress site. WordPress pages are built dynamically upon request through PHP and database calls. This can be a time-and-resource-heavy operation. If a page cache is in place, however, a static copy of each newly generated page is stored and then used later for subsequent requests. It’s significantly faster to serve static content than it is to wait for WordPress to generate dynamic content. Since most WP pages are exactly the same each time they are built, it makes sense to store these static copies and serve them to the site’s visitors. Page caching is an important ingredient in improved user experience.

    How Caching Works

    Populating a page cache is not always a straightforward matter. Simple sites can get away with caching a single copy of each page, but those sites which have significant customization or areas of private content will not. Luckily, both LSCache and W3 Total Cache have ways of addressing more complicated needs.

    W3 Total Cache

    W3 Total Cache provides two methods of page caching: Disk: Basic, and Disk: Enhanced..

    Disk: Enhanced mode makes use of rewrite rules in a site’s .htaccess file. It completely bypasses PHP and serves static HTML.

    Disk: Basic mode content is served instead by PHP.

    W3TC can cache logged-in users, but the cache is not stored privately or individually. The cache for logged-in users is stored in the same pool of files as for non-logged-in users. Caching logged-in users is not recommended, as the lack of a private cache can cause guest users to see content meant for logged-in users.

    LiteSpeed

    One important thing that separates LiteSpeed Cache from other cache plugins is its tight integration with LiteSpeed Web Server. So, when we talk about the plugin’s capabilities, we are often actually talking about the server’s capabilities. The basic caching functions of LiteSpeed Cache require a LiteSpeed server in order to work, because the actual caching is carried out at the server level by LiteSpeed Web Server’s built-in cache module.

    That said, LiteSpeed’s caching works a lot like W3Total Cache’s Disk:Enhanced mode, with the important distinction that LSCache and LiteSpeed Web Server are a team and share the work. The plugin is provided as an easy way for WordPress to communicate with the cache engine, but it doesn’t execute any of the caching tasks, and the cache files themselves are not stored within the WordPress file structure.

    LiteSpeed Cache uses .htaccess rewrite rules and completely bypasses the use of PHP, as in W3 Total Cache’s Disk: Enhanced mode,. Good cache plugins prefer to avoid PHP because of its expensive overhead.

    Unlike W3TC, LiteSpeed can cache private content for logged-in users. LiteSpeed can also include dynamic content on otherwise static pages. We’ll go into more detail about how that works when we discuss eCommerce, although the concepts of ESI apply to any area of your WordPress site, not just shopping carts.

    Purging Cache on Demand

    Pages are not cached indefinitely. Both plugins require you to choose a TTL (Time to Live), which controls after how many seconds the cached content is considered expired. Sometimes, though, content must be purged from the cache before it reaches its natural expiration. This is handled differently between the two plugins.

    W3 Total Cache

    If a post is modified or a comment is posted, the static HTML copy of the post page is automatically deleted. A purge policy may also be defined, wherein an updated post will trigger a purge of all of the selected related pages. W3TC recommends selecting only Posts page, Post page, and Blog feed as additional options “may reduce server performance.”

    LiteSpeed

    LiteSpeed, too, purges the static HTML copy of any post that has been modified. It also removes related content from the cache based on your defined purge policy. Unlike W3TC, LSCache can purge all related content without reducing server performance. LiteSpeed’s sophisticated tag-based smart purge system is made possible by the plugin’s partnership with LiteSpeed Web Server. This relationship allows LSCache to remember things about the cache entries that other plugins cannot, and to then act efficiently when content is created or edited. This makes it possible to manually purge the entire cache or just a single page, if desired.There is never too much or too little removed from the cache.

    Handling Expired and Purged Cache

    Garbage collection is important for any cache plugin. There will always be a cache directory on your server filling up and taking up space. Let’s look at how W3TC and LSCache clean up after themselves.

    W3 Total Cache

    With W3 Total Cache, you set an interval for garbage collection. A job runs on the specified schedule, deleting expired static HTML files from the cache directory. If you are using cache fragments, a separate garbage collection schedule may be set up for that.

    LiteSpeed

    LiteSpeed’s tag-based system isn’t only helpful for efficient purging, but it also allows garbage collection to have minimal impact on server performance. When the LiteSpeed server receives the purge header, it avoids heavy disk I/O by simply marking the related tags as “purged” without actually deleting the files on the file system.

    LiteSpeed Server will delete the outdated entries in small batches during non-busy CPU cycles, causing a minimum of side effects.

    Cache Varies

    For situations where you need multiple publicly cached copies of a single page, both plugins offer solutions.

    W3 Total Cache

    W3 Total Cache has support for user agent groups and referrer groups. In both cases, you create rules to assign visitors to particular groups, each of which can be configured to either refer to a different URL, or use a different theme. A separate cache is created for each group.

    LiteSpeed

    LiteSpeed’s enormously flexible server-side cache engine allows it to use vary cookies to serve multiple versions of cached content. Varies can be based on things like mobile vs. desktop, geographic location, cookie, and user group.

    Cache Preloading and Rebuilding

    Both plugins have the ability to preload the cache. Cache crawlers traverse the site, and precache (or recache) any uncached pages. This minimizes the possibility of a visitor having to wait for any pages to be dynamically assembled.

    W3 Total Cache

    W3 Total Cache’s crawler simulates an unknown user on a desktop computer.

    LiteSpeed

    LiteSpeed Cache’s crawler also simulates a non-logged-in desktop user visit by default, but unlike W3TC, it may be configured to crawl cache varies, too. In fact, if you have the resources available, you could theoretically have dozens of crawlers going at once, simulating all sorts of user interactions: mobile vs, desktop, retail customers vs. wholesale customers, visitors with an affiliate cookie, etc.

    Compression

    Both plugins cache and serve compressed content.

    eCommerce

    eCommerce doesn’t lend itself to full page caching. With shopping cart pages and last-viewed product widgets, among other things, there are several areas of an eCommerce site that just cannot be cached publicly. Both plugins have their own way of handling this scenario.of private content on public pages.

    W3 Total Cache

    W3TC provides a mechanism for labeling eCommerce pages as uncacheable. Better not to cache these pages at all than to run the risk of one customer’s private data being cached publicly for all visitors. W3TC’s Pro version unlocks “Fragment Caching” which is a separate caching layer using the WordPress Transients API. It is theoretically possible to configure Fragment Caching to allow eCommerce sites to serve cached content, but it requires coding, and we were unable to find any specific documentation as to how this is best achieved.

    LiteSpeed

    LiteSpeed’s ESI (Edge Side Includes) implementation allows you to fully cache WooCommerce and other eCommerce pages. With ESI, holes are punched on a public page, and are filled with shopping cart data and other private content. Then, LiteSpeed serves the mixed-content page to the shopper, fully and safely cached. LiteSpeed’s ESI implementation is WooCommerce-aware, and is preconfigured to turn the cart and other Woo widgets into ESI blocks. It is easy, therefore, to cache WooCommerce’s mixed content with the flip of a switch.

    Premium Tools

    LiteSpeed Cache offers Image Optimization with WebP Generation, Critical CSS Generation, Unique CSS Generation, and Low-Quality Image Placeholder Generation. These services are performed remotely on QUIC.cloud servers so as not to put any extra load on yours. Each service includes some free quota every month. After that quota may be purchased. More details are available at QUIC.cloud.

    W3TC offers an Image Service API extension, which generates WebP images on their remote servers. A certain amount of usage is free, after which a Pro account is required.

    Documentation

    W3TC has minimal documentation. In fact, we relied heavily on third-party tutorials and our own exploration of the plugin’s interface while researching this blog post. You can find some W3TC information on the WordPress Plugin Directory page, along with a disorganized FAQ.

    LiteSpeed has a documentation site which explains each of the functions of the plugin and is constantly updated with new information and troubleshooting tips.

    Cost

    As of this writing, W3 Total Cache is free, but a Pro subscription is available for $99/year. Support for free plugin users is available on the WP forum, but more in-depth support is available to buy from the site and prices range from $200 – $350.

    The LiteSpeed Cache plugin is 100% free, however you need a LiteSpeed web server in order to use the server-side cache, and there may be costs there, depending on your needs. There is a free, open source version (OpenLiteSpeed), or you can get an Enterprise license. License pricing ranges from Free for single site owners, to $96/month for large hosting companies, with several levels in between.

    LiteSpeed provides free support via the WP forum, Slack, and customer tickets. There are paid support options for in-depth troubleshooting and full site optimization, and these range from $39 to $99.

    Benchmarks

    LiteSpeed Cache vs. WP Rocket: and W3 Total Cache

    We compared LiteSpeed Web Server + LSCache to various other solutions, including W3 Total Cache.

    Our results showed Apache + W3 Total Cache peaking around 1300 requests per second.
    LiteSpeed Web Server + W3 Total Cache delivered around 4,700 requests per second.
    LiteSpeed Web Server + LSCache easily handled close to 5,200 requests per second.

    Feature Comparison

    Let’s take a closer look at the specific features that come built into LSCache and W3 Total Cache.

    ✅ = has the feature
    💰 = has the feature, but it requires a Pro subscription, or costs extra money in addition to any license costs
    ❌ = doesn’t have the feature

    Cache Features

    Both LiteSpeed Cache and W3 Total Cache have a variety of functions, but caching is the main ingredient. While both plugins feature a full-page cache, LiteSpeed’s cache engine is smart and flexible, allowing you to cache more of your site for more visitors. LSCache provides private cache capabilities, allowing you to cache logged-in users and eCommerce safely, while W3TC does not..

    Learn more about how caching WordPress works in general, and how LiteSpeed Cache works in particular here.

    Remember, you need LiteSpeed-powered hosting if you want to use LSCache’s cache features.

    Feature LiteSpeed Cache W3 Total Cache*
    Full-Page Cache ✅**
    Tag-Based “Smart Purge” ✅**
    Tight Integration With Server ✅**
    Edge Side Includes (ESI) ✅**
    Crawler (Cache Preloading) ✅**
    WordPress Multi-Site Support ✅**
    Cache Logged-in Users ✅** ✅ (not recommended)
    Cache Separate Mobile View ✅**
    Cache Vary on User Group ✅**
    Cache Vary on Geographic Location, Currency, etc ✅**
    Cache REST API ✅** 💰
    Purge Selected URLs on a Schedule ✅**
    Browser Cache Support ✅**

    * We based the W3 Total Cache feature list on what we could glean from the WP Directory, plugin interface, and blog posts
    **Feature requires a licensed copy of LiteSpeed Web Server with Cache Module

    Optimization Features

    If you use site evaluation tools, like Google’s PageSpeed Insights, or GTmetrix, you’ll want a nice selection of optimization features in order to implement the tool’s suggested site improvements.

    Unlike the Cache Features above, LiteSpeed Cache’s Optimization Features are available to anyone with any web server (LiteSpeed, Apache, nginx, etc.)

    Feature LiteSpeed Cache W3 Total Cache*
    CDN Support
    Database Optimization
    CSS Minify
    CSS Combine
    CSS HTTP/2 Push
    JavaScript Minify
    JavaScript Combine
    JavaScript HTTP/2 Push
    Load CSS Asynchronously 💰
    Load JavaScript Deferred
    HTML Minify
    Exclude Selected URI’s from Optimization
    Remove Query Strings
    Remove Google Fonts
    Lazy Load Images
    Lazy Load iframes
    Wildcard Usage in CDN Support

    * We based the W3 Total Cache feature list on what we could glean from the WP Directory, plugin interface, and blog posts

    Provided Services

    LiteSpeed provides premium optimization services on our own servers.

    Service LiteSpeed Cache W3 Total Cache*
    Critical CSS Generation** ✅ | 💰
    Unique CSS Generation** ✅ | 💰
    Image Optimization** ✅ | 💰
    WebP Generation** ✅ | 💰 ✅ | 💰
    Low-Quality Image Placeholder Generation** ✅ | 💰

    * We based the W3 Total Cache feature list on what we could glean from the WP Directory, plugin interface, and blog posts
    ** These features, where available, include an amount of free usage, after which more may be purchased or a Pro license is required

    Costs

    The LiteSpeed Cache plugin is free and always will be. In order to use the caching functionality, a LiteSpeed web server is required, and that may incur a fee. The optimization functionality, which is separate from caching, may be freely used by anyone with any web server.

    For more information about how to get powered by LiteSpeed Web Server and the costs involved, see our website.

    Service LiteSpeed Cache W3 Total Cache*
    Plugin Cost FREE** FREE or $99/year
    Support Cost FREE FREE or $200-$350

    * We based W3 Total Cache costs on what we found listed publicly on the W3 Total Cache website
    **Requires Licensed copy of a LiteSpeed Web Server with Cache Module for Cache Features

    Conclusion

    LiteSpeed Cache for WordPress is faster than W3 Total Cache and allows more flexibility when it comes to eCommerce, logged-in users, and cache varies. You can use both plugins for free, or with additional costs, depending on your site’s needs.

    If you’d like to try LiteSpeed Cache, drop by our website to learn how to get started!


    This content was last verified and updated in March of 2022. If you find an inaccuracy, please let us know! In the meantime, see our documentation site for the most up-to-date information.

  • LiteSpeed Cache vs. WP Super Cache

    LiteSpeed Cache vs. WP Super Cache

    LiteSpeed Cache vs. WP Super Cache

    If you are stuck on choosing a cache plugin for your WordPress site let’s make things a little bit easier for you. Today we are comparing the features and costs of LiteSpeed Cache for WordPress and WP Super Cache. We’ll talk about how each plugin works, and then we’ll share a side-by side comparison of features.

    LiteSpeed Cache vs. WP Super Cache

    Let’s start by discussing each plugin’s caching capabilities, ecommerce compatibility, premium services, and costs.

    Caching

    Both plugins provide full-page caching for WordPress. Page caching is essential for a WordPress site, as it allows static snapshots to be generated and saved for the dynamically-generated page. It’s significantly faster to server static content than it is to wait for WordPress and PHP to assemble content dynamically. Most WP pages are exactly the same each time they are built, so using these snapshots makes sense, and delivers a much-improved user experience to the site’s visitors.

    How Caching Works

    Generating a page cache for WordPress is not always straightforward. Some sites have significant customization or areas of private content, which means a single cached copy of each page will not be enough to cover the needs of every visitor. Both LSCache and WP Super Cache have ways of addressing these scenarios, some of which are more effective than others.

    WP Super Cache

    WP Super Cache provides three methods of page caching: Simple, Expert, and WP-Cache.

    The Simple and Expert methods produce what they call “supercached” static HTML files, while WP-Cache produces a sort of hybrid that allows for some dynamic content to be included on the page.

    WP-Cache is mainly used to cache pages for logged-in users, those who leave comments, or those who will have private content displayed on the page. It can also be used to cache feeds, and URLs with parameters. It is the slowest caching mode of the three.

    Expert mode makes use of rewrite rules in a site’s .htaccess file. It completely bypasses PHP and serves “supercached” static HTML. This is the fastest WP Super Cache mode.

    Simple mode is similar to Expert in that it serves so-called supercached files, however rewrite rules are not involved. The content is served instead by PHP. The plugin authors recommend using Simple mode as it is easier to set up than Expert mode and doesn’t involve editing .htaccess, though it does result in serving content more slowly than in Expert mode.

    Caching with LiteSpeed

    LiteSpeed Cache is a lot like WP Super Cache’s Expert mode, but with one important difference: the plugin is not actually doing the caching. The basic LSCache functions are carried out by LiteSpeed Web Server’s built in cache module. The plugin is provided as an easy way for WordPress to communicate with the cache engine, but it doesn’t execute any of the caching tasks, and the cache files themselves are not stored within the WordPress file structure.

    Like WP Super Cache’s Expert mode, LiteSpeed Cache uses .htaccess rewrite rules and completely bypasses the use of PHP. It is preferred to avoid PHP because of its expensive overhead.

    LiteSpeed can cache private content for logged-in users, and can include dynamic content on otherwise static pages, similar to WP Super Cache’s WP-Cache mode, but more flexible. We’ll go into more detail about how each plugin does this when we discuss eCommerce, although the concepts apply to any area of your WordPress site, not just shopping carts.

    Purging Cache on Demand

    Both plugins require you to specify an expiration time or TTL (Time to Live) for content. This is a default number of seconds that cached content is considered fresh. Sometimes, though, content must be purged from the cache before it reaches its natural expiration.

    WP Super Cache

    If a post is modified or a comment is posted, the static HTML copy of the post page is automatically deleted. Admin users may also choose to manually delete the entire cache.

    LiteSpeed

    LiteSpeed, too, purges the static HTML copy of any post that has been modified, but it also goes a step further. Because of the plugin’s tight integration with the server on one end, and with WordPress on the other, LSCache remembers things about the cache entries that other plugins cannot, and it is able to act efficiently when content changes. When content is created or edited and must be purged from the cache, LSCache uses a tag-based system to identify related content that must also be purged. In this way, there is never too much or too little removed from the cache. It is also possible to manually purge the entire cache or a single page, if desired.

    Handling Expired and Purged Cache

    No matter which plugin you use, there will be a cache directory on your server that continually fills up and takes up space. Let’s look at how each of the plugins cleans up after itself.

    WP Super Cache

    With WP Super Cache, you set a schedule for garbage collection. A job runs on the specified schedule, deleting expired static HTML files from the cache directory.

    LiteSpeed

    LiteSpeed’s garbage collection works differently. Because tags are tracked and stored in shared memory, the server has an efficient way of determining when a page needs to be deleted from cache. When the LiteSpeed server receives the purge header, it simply marks the related tags as “purged” but does not actually delete the files on the file system. This is to avoid heavy disk I/O while serving the response.

    LiteSpeed Server will deal with the outdated entries during non-busy CPU cycles and delete files in small batches with minimum side effects.

    Cache Varies

    Both plugins allow multiple public cache versions of a single page, for certain situations.

    WP Super Cache

    WP Super Cache has support for mobile browsers. If you have a non-responsive desktop theme and are using a separate theme for mobile traffic, you can enable this option to have two copies of each page stored in cache: one for desktop visitors, and one for mobile.

    LiteSpeed

    You can have multiple cache copies (aka “cache varies”) in LiteSpeed as well, but it is more sophisticated than simply mobile vs. desktop. LiteSpeed’s server-side cache engine allows it to use vary cookies to serve multiple versions of cached content based on things like geographic location, cookie, and user group. There is enormous flexibility in the LiteSpeed cache vary system.

    Cache Preloading and Rebuilding

    WP Super Cache and LiteSpeed Cache both have the ability to preload the cache. Cache crawlers traverse the site, caching any pages that are not currently cached, and minimizing the possibility of a visitor having to wait for any pages to be dynamically assembled.

    Wp Super Cache

    WP Super Cache’s crawler simulates an unknown user on a desktop computer. If Cache Rebuild is enabled, garbage collection is turned off while the crawler runs so that an existing supercache file may be served to visitors on very busy sites while a new file is being generated.

    LiteSpeed

    LiteSpeed Cache’s crawler also simulates a non-logged-in desktop user visit by default, but may be configured to crawl as a mobile user as well. Additionally, for sites that employ user-group-based cache varies (i.e. retail customers vs. wholesale customers), or cookie-based varies (i.e. visitors with an affiliate cookie), the cache may be crawled simulating a logged-in user from any particular user group, or a user with a particular cookie. If you have the resources available, you could theoretically have dozens of crawlers going at once, simulating all sorts of user interactions.

    Compression

    Both plugins cache and serve compressed content. WPSC supports gzip compression, while LiteSpeed supports both gzip and brotli.

    eCommerce

    When you run an online shop, there are necessarily going to be pages (and sections of pages) that can’t be stored in the public cache. Shopping cart pages and last-viewed product widgets, are good examples of this.

    Handling Private Content with WP Super Cache

    WP Super Cache recommends using JavaScript for generating dynamic content, as JS doesn’t interfere with caching. This is a good idea and true for any cache plugin.

    If JS is not an option, WPSC allows you to use a WordPress filter called wpsc_cachedata along with placeholder tags. The placeholders can be replaced with dynamically-generated HTML, and may be used for any content from a simple string to a shopping cart.

    As this solution requires the use of a WordPress filter, it’s mostly aimed at developers who want to make their plugins compatible with WP Super Cache. Also, keep in mind that this dynamic content is not cached, which will slow down the serving of the page considerably.

    Handling Private Content with LiteSpeed

    LiteSpeed allows you to cache WooCommerce and other pages that contain mixed content. With ESI (Edge Side Includes), holes are punched on a public page, and are filled with shopping cart data and other private content. Then, the mixed-content page can be served to the shopper, fully cached.

    This hole-punching behavior is built in to LSCache and is automated for WooCommerce, and some other popular plugins. Conveniently, ESI can be configured by site admins for use with any widget or shortcode. Developers may also choose to have their plugins support ESI natively through the LiteSpeed API.

    Optimization

    If you use site evaluation tools, like Google’s PageSpeed Insights, or GTmetrix, you’ll want a nice selection of optimization features in order to implement the tool’s suggested site improvements.

    WPSC does not offer any optimization features aside from CDN support.

    LSCache, however, includes CDN support, database optimization, minification and combination of JavaScript and CSS, HTTP/2 push, lazy load, and a variety of other popular optimization features, as shown in the table below. If you want to improve your PageSpeed score without installing additional plugins, LiteSpeed is the better choice.

    Premium Services

    WP Super Cache does not offer any extra premium services.

    LiteSpeed Cache offers Image Optimization, Critical CSS Generation, and Lazy Load Responsive Placeholder Generation, all for free. These services are performed remotely on LiteSpeed’s own servers so as not to put any extra load on yours.

    Cost

    WP Super Cache is 100% free.

    The LiteSpeed Cache plugin is also free, however a LiteSpeed web server is required in order to use the server-side cache, and there may be costs there, depending on your needs. There is a free, open source version (OpenLiteSpeed), or you can get an Enterprise license. License pricing ranges from Free for single site owners, to $96/month for large hosting companies, with several levels in between.

    Feature Comparison

    Let’s take a closer look at the specific features that come built into LSCache and WP Super Cache.

    ✅ = has the feature
    💰 = has the feature, but it costs extra money in addition to any license costs
    ❌ = doesn't have the feature
    

    We’ve listed these features using LiteSpeed Cache terminology. If the other plugin calls it something different, we put their term in parentheses.

    Cache Features

    Feature LiteSpeed Cache WP Super Cache*
    Full-Page Cache ✅**
    Tag-Based “Smart Purge” ✅**
    Tight Integration With Server ✅**
    Edge Side Includes (ESI) ✅**
    Crawler ✅** (Preload/Rebuild)
    WordPress Multi-Site Support ✅**
    Cache Logged-in Users ✅** (WP-Cache caching)
    Cache Separate Mobile View ✅**
    Cache Vary on User Group ✅**
    Cache Vary on Geographic Location, Currency, etc ✅**
    Cache REST API ✅**
    Purge Selected URLs on a Schedule ✅**
    Browser Cache Support ✅**

    * WP Super Cache feature list is based on what is listed publicly on its WP Plugin Directory page
    **Feature requires a licensed copy of LiteSpeed Web Server with Cache Module

    Optimization Features

    Feature LiteSpeed Cache WP Super Cache*
    CDN Support
    Database Optimization
    CSS Minify
    CSS Combine
    CSS HTTP/2 Push
    JavaScript Minify
    JavaScript Combine
    JavaScript HTTP/2 Push
    Load CSS Asynchronously
    Load JavaScript Deferred
    HTML Minify
    Exclude Selected URI’s from Optimization
    Remove Query Strings
    Remove Google Fonts
    Lazy Load Images
    Lazy Load iframes
    Wildcard Usage in CDN Support

    * WP Super Cache feature list is based on what is listed publicly on its WP Plugin Directory page

    Premium Provided Services

    Service LiteSpeed Cache WP Super Cache*
    Critical CSS Generation
    Image Optimization
    Responsive Lazy Load Placeholder Generation

    * WP Super Cache feature list is based on what is listed publicly on its WP Plugin Directory page

    Costs

    Cost LiteSpeed Cache WP Super Cache*
    Plugin Cost FREE** FREE
    Support Cost FREE FREE

    * WP Super Cache costs are based on what is listed publicly on its WP Plugin Directory page
    **Requires a licensed copy of LiteSpeed Web Server with Cache Module for Cache Features

    Conclusion

    LiteSpeed Cache for WordPress and WP Super Cache both offer comprehensive full-page caching with a variety of features, but LiteSpeed’s server-side cache is more flexible, particularly when it comes to private cache and targeted cache management.

    Plus, only LiteSpeed has a suite of popular site optimization functions, making it a great all-in-one acceleration solution for WordPress.

    If you’d like to try LiteSpeed Cache, drop by our website to learn how to get started!

  • LiteSpeed Cache Package for Laravel

    LiteSpeed Cache Package for Laravel

    LiteSpeed Cache Package for Laravel
    Introducing the newest member of the LiteSpeed Cache plugin family: the LiteSpeed Cache Package for Laravel!

    Now you can implement LiteSpeed’s powerful caching features in your custom-developed Laravel websites.

    The Laravel LSCache composer package allows you to manage LiteSpeed’s powerful server-level full-page cache for both public and private content. With tag-based caching and purging, and the ability to punch private holes in public content with ESI, you can cache virtually any page on your Laravel site with unparallelled accuracy.

    What’s in the Package?

    The free and open source LiteSpeed Cache package contains two middlewares and one facade to cover three functionalities:

    • LSCache Middleware to control the cache-control header for LSCache
    • LSTags Middleware to control the tag header for LSCache
    • LSCache Facade to handle purging of cache entries

    LSCache Features

    The LSCache package, when paired with LiteSpeed Web Server, gives your custom-built Laravel sites a number of advantages.

    You get a server-level full-page cache, accurate for both public and private content, sometimes appearing together on a single page, thanks to ESI. You get a sophisticated tag-based caching and purging system, the ability to set a cache expiration as short or as long as you need, and caching for routes and route groups. The helper functions found in the LiteSpeed Cache package make all of this (and more) easy for you to implement.

    Learn more about accelerating your Laravel projects, and download the package today!

  • LiteSpeed Cache vs. WP Rocket

    LiteSpeed Cache vs. WP Rocket

    LSCWP vs WP Rocket2

    Choosing a cache plugin for your WordPress site can be a daunting task, but we are here to make things a little bit easier for you. Today we are comparing LiteSpeed Cache and WP Rocket.

    LiteSpeed Cache vs. WP Rocket

    Before we do a specific feature list comparison, let’s talk about some of the main similarities and differences between the two plugins.

    Caching

    Both plugins provide full-page caching for WordPress. This essentially means that they store static snapshots of the pages on your site. They can do this because the dynamically-generated pages are effectively the same each time they are built. Rather than making your visitors wait for WordPress and PHP to assemble the pages for each request, a page cache can serve them the snapshots much faster.

    Caching with WP Rocket

    WP Rocket, like most other WordPress cache plugins (including LiteSpeed), uses rewrite rules to tell the server where to look for cached content. It places pages in the cache by writing to the file system, and purges pages from the cache by deleting the files. It can tell whether or not a page is cached by checking for the presence of the file. And it can tell if a cached page has expired by comparing the file time to the page’s TTL.

    Caching with LiteSpeed

    The LiteSpeed Cache plugin works in a similar way, with one important difference: the plugin is not actually doing the caching. The basic LSCache functions are carried out by LiteSPeed Web Server’s builtin cache module. The plugin is provided as an easy way for WordPress to communicate with the cache engine, but it doesn’t execute any of the caching tasks, and the cache files themselves are not stored within the WordPress file structure.

    There are many benefits to this server-side caching arrangement. Here are a few of them:

    * Accurate Purge

    Because of the plugin’s tight integration with the server on one end, and with WordPress on the other, LSCache remembers things about the cache entries that other plugins cannot, and it is able to act efficiently when content changes. When content is created or edited and must be purged from the cache, LSCache uses a tag-based system to identify related content that must also be purged. In this way, there is never too much or too little removed from the cache.

    * Efficient Cache Cleanup

    Tags are tracked and stored in shared memory. This provides an efficient way of determining when a page needs to be purged. When LiteSpeed receives the purge header, it simply marks the related tags as “purged” but does not actually delete the files on the file system. This is to avoid heavy disk I/O while serving the response. LiteSpeed Server will deal with the outdated entries during non-busy CPU cycles and delete files in small batches with minimum side effects.

    * Compression

    Another LiteSpeed advantage is Gzip and Brotli support out of the box. This allows compressed content to be stored in cache, which fits the majority of modern browsers. WP Rocket requires dynamic compression before serving each cached response, which results in much higher CPU usage in the real world.

    * Cache Varies

    LiteSpeed’s server-side cache engine allows it to use vary cookies to serve multiple versions of cached content based on things like device category (mobile vs. desktop), geographic location, cookie, and user group. There is enormous flexibility in the LiteSpeed system.

    Cost

    As of this writing, a WP Rocket license starts at $49/year. There is no free option or trial version, but they do offer a 14-day money back guarantee.

    The LiteSpeed Cache plugin is 100% free, however a LiteSpeed web server is required in order to use the server-side cache, and there may be costs there, depending on your needs. There is a free, open source version (OpenLiteSpeed), or you can get an Enterprise license. License pricing ranges from Free for single site owners, to $96/month for large hosting companies, with several levels in between.

    eCommerce

    When you run an online shop, there are necessarily going to be pages (and sections of pages) that can’t be stored in the public cache. Shopping cart pages and last-viewed product widgets, are good examples of this.

    WP Rocket supports eCommerce solutions such as WooCommerce by automatically considering cart and checkout pages uncacheable. Pages with this private content are dynamically generated each time and served uncached.

    LiteSpeed allows you to cache WooCommerce and other eCommerce pages using ESI (Edge Side Includes). With ESI, holes are punched on a public page, and are filled with shopping cart data and other private content. Then, the mixed-content page can be served to the shopper, fully cached.

    Premium Services

    WP Rocket does not offer any extra premium services.

    LiteSpeed Cache offers Image Optimization, Critical CSS Generation, Unique CSS Generation, and Low-Quality Image Placeholder Generation. These services are performed remotely on QUIC.cloud servers so as not to put any extra load on yours. Each service includes some free quota every month. After that quota may be purchased. More details are available at QUIC.cloud.

    Cache Preloading

    WP Rocket and LiteSpeed Cache both have crawlers. These crawlers traverse the site, caching any pages that are not currently cached.

    WP Rocket’s crawler simulates a non-logged-in desktop user visit.

    LiteSpeed Cache’s crawler also simulates a non-logged-in desktop user visit by default, but may also be configured to crawl as a mobile user. Additionally, for sites that employ user-group-based cache varies (i.e. retail customers vs. wholesale customers), or cookie-based varies (i.e. visitors with an affiliate cookie), the cache may be crawled simulating a logged-in user from any particular user group, or a user with a particular cookie. If you have the resources available, you could theoretically have dozens of crawlers going at once, simulating all sorts of user interactions.

    Benchmarks

    LiteSpeed Cache vs. WP Rocket: Benchmarks

    We compared LiteSpeed Web Server + LSCache to various other solutions, including WP Rocket.

    Our results showed Apache + WP Rocket peaking around 700 requests per second.

    LiteSpeed Web Server + WP Rocket delivered around 3,800 requests per second.

    LiteSpeed Web Server + LSCache easily handled close to 4,500 requests per second.

    Feature Comparison

    Let’s take a closer look at the specific features that come built into LSCache and WP Rocket.

    ✅ = has the feature
    💰 = has the feature, but it costs extra money in addition to any license costs
    ❌ = doesn't have the feature
    

    The features are listed using LiteSpeed Cache terminology. If the other plugin calls it something different, we put their term in parentheses.

    Cache Features

    Both LiteSpeed Cache and WP Rocket have a variety of functions, but caching is the star of the show. While both plugins feature a full-page cache, LiteSpeed’s cache engine is smart and flexible, allowing you to cache more of your site for more visitors. LSCache gives you the ability to confidently cache frequently-changing content and eCommerce sites, without resorting to marking pages “uncacheable.”

    Learn more about how caching WordPress works in general, and how LiteSpeed Cache works in particular here.

    Remember, LiteSpeed-powered hosting is required in order to use LSCache’s cache features.

    Feature LiteSpeed Cache WP Rocket*
    Full-Page Cache ✅**
    Tag-Based “Smart Purge” ✅**
    Tight Integration With Server ✅**
    Edge Side Includes (ESI) ✅**
    Crawler ✅** (Cache Preloading)
    WordPress Multi-Site Support ✅**
    Cache Logged-in Users ✅** (User Cache)
    Cache Separate Mobile View ✅**
    Cache Vary on User Group ✅**
    Cache Vary on Geographic Location, Currency, etc ✅**
    Cache REST API ✅**
    Purge Selected URLs on a Schedule ✅**
    Browser Cache Support ✅**

    * WP Rocket feature list is based on what is listed publicly on the WP Rocket website
    **Feature requires a licensed copy of LiteSpeed Web Server with Cache Module

    Optimization Features

    If you use site evaluation tools, like Google’s PageSpeed Insights, or GTmetrix, you’ll want a nice selection of optimization features in order to implement the tool’s suggested site improvements.

    Unlike the Cache Features above, LiteSpeed Cache’s Optimization Features may be used freely by anyone with any web server (LiteSpeed, Apache, nginx, etc.)

    Feature LiteSpeed Cache WP Rocket*
    CDN Support
    Database Optimization
    CSS Minify
    CSS Combine (Concatenation)
    JavaScript Minify
    JavaScript Combine (Concatenation)
    Load CSS Asynchronously
    Load JavaScript Deferred
    HTML Minify
    Exclude Selected URI’s from Optimization
    Remove Query Strings
    Remove Google Fonts
    Lazy Load Images
    Lazy Load iframes
    Wildcard Usage in CDN Support

    * WP Rocket feature list is based on what is listed publicly on the WP Rocket website

    Provided Services

    LiteSpeed provides premium optimization services on our own servers.

    Service LiteSpeed Cache* WP Rocket**
    Critical CSS Generation ✅ | 💰
    Unique CSS Generation ✅ | 💰
    Image Optimization ✅ | 💰
    Low Quality Image Placeholder Generation ✅ | 💰

    * These LiteSpeed features all include an amount of free quota, and more may be purchased, if required
    ** WP Rocket feature list is based on what is listed publicly on the WP Rocket website

    Costs

    The LiteSpeed Cache plugin is free and always will be. Caching functionality requires a LiteSpeed web server, which may incur a fee. The optimization functionality, which is separate from caching, may be freely used by anyone with any web server. Online services powered by QUIC.cloud all have a free tier, but charge for additional service.

    For more information about how to get powered by LiteSpeed Web Server and the costs involved, see our website.

    Service LiteSpeed Cache WP Rocket*
    Plugin Cost FREE** PAID
    Support Cost FREE PAID

    * WP Rocket costs are based on what is listed publicly on the WP Rocket website
    **Requires Licensed copy of a LiteSpeed Web Server with Cache Module for Cache Features

    Conclusion

    LiteSpeed Cache for WordPress beats WP Rocket in flexibility and speed. Cost varies with a variety of factors for both plugins, but LiteSpeed Cache has some free options that WP Rocket does not.

    If you’d like to try LiteSpeed Cache, drop by our website to learn how to get started!


    This content was last verified and updated in March of 2022. If you find an inaccuracy, please let us know! In the meantime, see our documentation site for the most up-to-date information.

  • The Best WordPress Cache Plugin

    The Best WordPress Cache Plugin

    Best WordPress Cache Plugin
    You’ve heard that caching your website is a good idea, but there are so many cache plugins in the WordPress Plugin Directory, it can be overwhelming to choose. So, how can you figure out which is the best WordPress cache plugin? First it helps to understand a few basic concepts, namely, what is a cache, and why is caching important for WordPress?

    What is a Cache?

    A cache provides a way for you to retrieve content faster than it would be to retrieve it directly from the original source. Imagine that you had a cache of freshly baked brownies. It is much faster for your visitors to get a delicious treat from your brownie cache than for them to go to the original source (i.e. your kitchen), where they would have to wait for the ingredients to be assembled, baked, and cooled before they could take a bite.

    Not only might your visitors get impatient waiting for your brownies to be baked from scratch, but they might decide to visit your competitor, who always has a nice warm cache of brownies available with no wait.

    It’s the same with your website. It’s far better to have the content already assembled and sitting in a cache ready-to-serve, than it is to make your visitors wait for it to be generated from scratch.

    Why is Caching Important for WordPress?

    WordPress sites benefit greatly from caching. Every page on your WP site is built with PHP. The HTML pages that make up your website don’t exist anywhere in the file system. Instead, they are constructed on-demand, through PHP, and then served to the visitor as HTML. Much like baking brownies from scratch, this is a resource-intensive process. And so, it is in a WordPress site owner’s best interest to cache pages after they are generated. A warm cache means that content is served to visitors quickly upon request. There’s no waiting around for PHP to do its thing, and a much smaller chance that visitors will get impatient and leave!

    What is the Best WordPress Cache Plugin?

    When it comes to choosing a cache plugin for your WordPress site, you have a lot of choices. But not all cache plugins are created equal.

    For best results, you want a caching solution that can efficiently and intelligently manage your site’s cache, while also providing an impressive suite of optimization features. Better yet, it should do all of those things and be free.

    LiteSpeed Cache for WordPress ticks all of those boxes.

    LiteSpeed Cache is an Efficient Cache

    Unlike other plugins, the caching functions in the LiteSpeed Cache plugin are executed at the server level. This is why LiteSpeed Web Server is required. The plugin’s function is to communicate with the server’s cache engine. It doesn’t actually execute any of the caching tasks, and the cache files themselves are not stored within the WordPress file structure.

    The LiteSpeed Cache plugin for WordPress communicates directly with LiteSpeed Web Server to store static copies of dynamically-generated web pages. There is no middle layer, and no need to invoke PHP.

    This translates into superior performance and a faster experience for your users (as our benchmarks can attest). Speed is important, both in terms of your site’s search rank (SEO), and your visitors’ short attention spans.

    LiteSpeed Cache is an Intelligent Cache

    Because the cache is integrated into the server, LSCache can remember things about the cache entries that other plugins cannot. It can analyze dependencies. It can utilize tags to manage the smart purging of the cache. And it can use vary cookies to serve multiple versions of generated content based on user agent, geography, currency, and more.

    Through its tight integration with the server, LiteSpeed Cache provides powerful cache management tools that are simply not possible for the other plugins to replicate.

    What does this mean for your website?

    For one thing, it means that LiteSpeed knows precisely which pages to purge from the cache when you edit or create content. For example, if you publish a new blog post with the category cameras and the tags canon and dslr, then LiteSpeed knows that

    • yoursite.com/category/cameras,
    • yoursite.com/tag/canon, and
    • yoursite.com/tag/dslr

    are no longer fresh in the cache. LiteSpeed purges those pages automatically, ensuring that content on yoursite.com will always be up-to-date for visitors.

    You can keep your site cached for a nice long time, confident that individual pages will automatically be purged when necessary. Other cache plugins can’t do this as precisely. They either purge too few pages or too many.

    LiteSpeed Cache Includes a Suite of Premium Optimization Features

    Caching is essential, but it’s not the only optimization you should use on your WordPress site. For a fast site that ranks well in search and delivers a pleasant experience to your visitors, you should consider implementing as much of the following as possible:

    • Image Optimization
    • Asynchronous CSS
    • Critical CSS Generation
    • WebP Images
    • Lazy Load for Images
    • Minify and Combine for CSS and JavaScript
    • Deferred Load for JavaScript

    LiteSpeed Cache comes with all of these optimization features and many more. Here is the complete list.

    LiteSpeed Cache is FREE

    The plugin itself is 100% free, and always will be. The required server may be free, depending on your needs.

    If you don’t really know much about web servers, you’ll want to read Get LiteSpeed Web Server, which provides a tool to check which web server you currently are using, and then shows you where to find a hosting provider that offers LiteSpeed, if you need one.

    On the other hand, if you know your way around managing a web server, you can get LiteSpeed Web Server Enterprise on your site for free, if your needs are simple. The Free Starter License is available for single-domain use.

    Those with more than one domain, or those who are considering becoming a LiteSpeed hosting provider will want one of the more robust licenses, ranging in price from $10/month to $96/month. A 15-day free trial is available. You can get all of the details about the available licenses on our pricing page.

    And of course, you are always welcome to download a copy of OpenLiteSpeed, the free, open source version of LiteSpeed Web Server.

    Try the Best WordPress Cache Plugin Today!

    Have we convinced you to take LiteSpeed Cache for a spin?

    Try LiteSpeed Cache Now!

    Want to better understand caching in WordPress? See Caching 101 for an in-depth discussion of caching WordPress in general, and LiteSpeed Caching 101 for more about LiteSpeed-specific caching.

  • WpW: LSCache for WordPress 2018 Milestones

    WpW: LSCache for WordPress 2018 Milestones

    WordPress Wednesday: LiteSpeed Cache for WordPress 2018 Milestones

    Welcome to another installment of WordPress Wednesday!
    Today’s topic is: LiteSpeed Cache for WordPress 2018 Milestones

    Another year has come to a close, and we thought we would take a look back and see just what we’ve accomplished with our WordPress Plugin.

    Many of the new features and improvements we’ve implemented are thanks to your suggestions. We always appreciate your feedback and ideas, so please keep them coming. Our Slack community is a great place to do that.

    Notable Updates

    We introduced a game-changer in 2018: support for non-LiteSpeed users! Of course, you get the most out of the LiteSpeed Cache plugin, if you have LiteSpeed Web Server and can take advantage of the actual caching functions. But if that’s not in the cards for you for whatever reason, you can still take advantage of all of LiteSpeed’s non-caching functions, including our Image Optimization and Critical CSS services. These are premium features that most other WP optimization plugins make you pay for. But they’re free with LiteSpeed Cache.

    Speaking of Critical CSS, this was another big feature released last year. CCSS solves the “Flash of Unstyled Content” issue that plagues just about every site that follows Google’s recommendation to load CSS asynchronously. Our CCSS Generation service provides critical CSS for every type of post on your site, in both mobile and desktop variations, if necessary.

    Our fellow plugin developers will be pleased to know there have been several additions to our API. Among other things, we now have a way to address WP nonce issues. Check the API out.

    GUI

    We put some effort into making the plugin easier to use. To that end, we introduced Basic View, which allows you to hide the advanced settings, if you know you will never use them.

    Additionally, we added more “Learn More” links to the Settings tabs. These links bring you to our wiki, where the settings are explained in detail.

    LSCache New Purge Options

    We also added more varieties of Purge to the WP Dashboard Admin Bar. Because sometimes you just want to purge the optimized CSS/JS, or the Critical CSS. And sometimes you want to purge everything in sight.

    Supported Technologies

    Last year, LiteSpeed introduced support for several external technologies including the CloudFlare API, object cache, and opcode cache. These technologies are not implemented directly by LSCWP, but if you are already using them, LSCWP provides interfaces to allow you some degree of control.

    New Features

    Configuration

    For those of you who are always playing around with settings, changing things up, and trying something new, we added some useful features. Now you can Import and Export your settings, or press the Reset All Options button if you want to start from scratch. You can choose to have the plugin Auto Update when there’s a new version, and if you’re a hosting provider, you can now define a default configuration for all of the WP installations on your servers.

    Also new is a Disable All Features setting, which is useful when you are debugging.

    Image Optimization and Media

    Image Optimization and media handling was a big focus for us last year.

    In our Image Optimization service, we simplified the user experience, added more options for taking control of your media library, automated much of the process, introduced lossless compression and CLI support, and made several improvements to stability behind the scenes.

    In the Media Settings tab, new options were added for WebP image handling, using responsive Lazy Load placeholders, and inlining Lazy Load JavaScript.

    Cache Crawler

    Our cache crawler allows you to keep your cache warmed up. It periodically travels through your sitemap, looking for pages that have expired in the cache, and re-caches them. When we first introduced the crawler, it only had the ability to crawl from the point of view of a non-logged-in guest.

    This year, we added the ability to simulate different logged-in user roles, visits with and without WebP images, mobile device visits, and cache varies based on cookie values. You may now have several different crawlers running and warming up your cache for a variety of situations.

    Other New Settings

    Some of LSCWP’s updates last year didn’t get as much fanfare as others, but they’re still helpful in your quest to make your WordPress site the fastest it can be! Things like inline CSS/JS minification, support for randomizing multiple CDNs and for setting specific directories to include in CDNs, a setting to force particular URLs to be cacheable, and Instant Click.

    Additionally, we made it easier for you to be compliant with the GDPR, and we introduced a Purge All Hooks setting that helps you assume even more control of cache purges on your site.

    Third Party Compatibility

    We know how important it is that all of your favorite plugins play nicely with each other, so to that end, we improved compatibility with some of them. We are now fully compatible with WMPL. We’ve added WebP support for Avada Fusion Sliders, PageSpeed Insights, and WooCommerce, and we now have ESI Shortcode support for Elementor. Plus, we made miscellaneous updates that improved compatibility with Ajax Login, Ninja Forms, Hide My WP, Universal Star Rating, Aelia Currency Switcher, NextGen Gallery, and Postman App, among others.

    For the full list of tested plugins, see our wiki.

    Future Plans / Reviews

    LiteSpeed Cache for WordPress 2018 Milestones: Ocean City NJ Boardwalk Mile Marker

    We’ve come a long way with this plugin in the past few years, and we’re not finished yet! 2019 will find us implementing a few more of your suggestions, and focusing on the speed and stability of our services.

    We appreciate your enthusiasm and support! Just look at some of these glowing testimonials we’ve received recently:

    Huge improvement in speed !!! Easy to install and configure and for someone like me who isn’t technical. Get their great support. Highly recommended.
    @ionas

    I have found this plugin to be absolutely brilliant when used in conjunction with the Litespeed web server.
    @johnclarkeau

    The Silver Bullet of Cache Plugins !!! My website went from having an ‘F’ in GTMetrix to having a ‘B.’ WOW !!!
    @pigo3934blog

    LSCache is the only plugin that gave me over 90% on GTmetrix, and boosted my website’s speed without breaking any of my site’s elements.
    @dimath99

    Clear documentation on how to fix an issue caused by my setup. Nice!! No searching support forums hoping to find an answer. Everything is working much better than expected!!
    @hutchm12

    There’s a lot more where that came from, and you can leave a review of your own there, if you would like to. Your kind words warm our hearts, so thank you! ❤

    Disclaimer: The information contained in this post is accurate for LSCWP v2.9 [release log]. If you are using a newer version of the plugin, some details may have changed. Please refer to our wiki for the latest!

    Have some of your own ideas for future WordPress Wednesday topics? Leave us a comment!

    We’ll be back soon with another installment. In the meantime, here are a few other things you can do:

  • WpW: WordPress Shortcodes as ESI Blocks

    WpW: WordPress Shortcodes as ESI Blocks

    WordPress Wednesday: Shortcodes as ESI Blocks

    Welcome to another installment of WordPress Wednesday!
    Today’s topic is: Turning WordPress Shortcodes into ESI Blocks

    If you’ve ever used ESI blocks before on your WordPress site, you know that they allow you to cache your content in an incredibly flexible way. We’ve talked before about ESI, and as part of that conversation we showed you how you could use ESI to cache widgets separately from the pages on which they appear.

    For example, you can set your entire site to be cached for a week, but set your ESI widgets to expire after only 12 hours, if they have time-sensitive content. Or you can set your widgets to contain privately cached content, even when the rest of the page is cached publicly. This latter scenario is especially useful in WooCommerce and other shopping sites. Be sure to read that blog post for the whole story about how ESI and ESI widgets work.

    Using ESI Shortcodes

    This ability to define a different set of parameters for caching widget content is so useful. It’s only natural to consider other WP constructs that could be made better with ESI. The “shortcode” is one such construct.

    As of LSCWP v2.8, ESI shortcodes are now supported. This allows you to cache the contents of the shortcode in a different way than you’ve cached the rest of the page.

    If you have a myeventlist shortcode, for example, and it inserts a list of upcoming events into your page, you might use it like this:

    [myeventlist month="December" year="2018"]

    In its most basic form, an ESI shortcode is written exactly like the original shortcode with an esi in front of it. So, to turn the myeventlist shortcode into an ESI block, you would instead write this:

    [esi myeventlist month="December" year="2018"]

    By default, shortcode contents are stored in public cache, and the TTL defaults to whatever value you have stored in LiteSpeed Cache > Settings > General > Default Public Cache TTL, but you can change that with a few parameters.

    To store the shortcode contents in private cache for five minutes (or 300 seconds), you can say this:

    [esi myeventlist month="December" year="2018" cache="private" ttl="300"]

    TL;DR: To turn a shortcode into an ESI shortcode, write it this way:

    [esi + original shortcode and its parameters + optional esi parameters + ]

    If You Deactivate LSCache…

    Turning WordPress Shortcodes into ESI Blocks: Apple Picking Sign

    If, for some reason, you decide in the future to deactivate the LiteSpeed Cache plugin, please be aware that your ESI shortcodes will no longer work. You will need to manually replace all ESI shortcodes with their original versions.

    In other words, you’d need to change

    [esi myeventlist month="December" year="2018" cache="private" ttl="300"]

    back to

    [myeventlist month="December" year="2018"]

    everywhere it appears.

    Limitations

    ESI shortcodes have one important limitation: while LiteSpeed Cache can easily cache your shortcode contents, it is not possible for LSCache to purge the shortcode contents on demand.

    Shortcode ESI blocks will naturally expire when the TTL is reached, but a purge cannot be triggered by particular events. This makes sense, because LiteSpeed can’t know which occurrences should trigger a purge. Different shortcodes all have different events that render them out-of-date, and there’s no way for LiteSpeed to know what they are.

    Using the example of the event listing plugin above, let’s say you use the following shortcode:

    [esi myeventlist month="December" year="2018"]

    This will cache the myeventlist block for the same length of time as your site’s default TTL. If someone edits an event before the TTL is reached, then the ESI block will, unfortunately, be out-of-date until it expires naturally.

    There are two ways to handle this issue:

    • Have the shortcode’s plugin author use our API to trigger a purge when block content changes.
    • Use a very short TTL, and live with the possibility that contents may be briefly out-of-date.

    Let’s look at these two options.

    Get the Plugin Author Involved

    If it’s important that the shortcode contents be purged by specific events, you can share this API call with the author of the shortcode’s plugin (just be sure to replace myeventlist with the actual name of the shortcode you want to purge:

    method_exists( 'LiteSpeed_Cache_API', 'purge' ) && LiteSpeed_Cache_API::purge( 'esi.myeventlist' ) ;

    LSCache uses a powerful tagging system, and all cached content is organized by one or more tags. Content that belongs to an ESI shortcode is tagged with esi.+shortcode-name. (In this example, that’s esi.myeventlist.)

    The plugin author should use this method any time the contents of the shortcode change. This is the most precise way to keep the content in the shortcode up-to-date and accurately cached according to the shortcode’s own requirements.

    Learn more about the LiteSpeed API on our wiki.

    Do it Yourself

    If it is not critical for the contents of the shortcode to have up-to-the-minute accuracy, then you can use the ttl parameter to cache the content for a short time. For example, if you can live with content that is an hour old, set ttl="3600". If you are thinking more along the lines of five minutes, set it to ttl="300".

    While it is possible to set the content to not be cached at all ( ttl="0"), it is not recommended. Any time there is uncached content on a page, PHP must be invoked in order to generate that content. PHP uses valuable resources, and significantly slows down a page. It’s far better to cache your content for a small amount of time than not at all.

    Do You Need ESI Shortcodes?

    Shortcodes are used for a wide variety of functions, and ESI will not be necessary for every one. If the shortcode contains private content on a public page, it might benefit from ESI. If it contains quickly-changing content on an otherwise mostly-static page, then ESI might be a useful way to cache more flexibly.


    Disclaimer: The information contained in this post is accurate for LSCWP v2.8.1 [release log]. If you are using a newer version of the plugin, some details may have changed. Please refer to our wiki for the latest!

    Have some of your own ideas for future WordPress Wednesday topics? Leave us a comment!

    We’ll be back soon with another installment. In the meantime, here are a few other things you can do:

  • WpW: Managing Multiple Cache Crawlers

    WpW: Managing Multiple Cache Crawlers

    Welcome to another installment of WordPress Wednesday!
    Today’s topic is: Managing Multiple Cache Crawlers

    LiteSpeed’s WordPress Cache Crawler travels your sitemap and re-caches any pages that have expired. By default, the crawler is run from the point of view of a non-logged-in guest. This is what that might look like on the LiteSpeed Cache > Crawler page:

    This is sufficient for a simple site, but some sites display different content in particular situations (for example, special content for logged-in users, specifically mobile content, or content that relies on the value of a cookie). What if you are in that situation? How do you configure the crawler to keep multiple views warm?

    The LSCache crawler can be configured to simulate traffic based on three different criteria:

    1. User roles
    2. Cookies (new!)
    3. Mobile view (new!)

    The first two options are controlled by settings on the LiteSpeed Cache > Settings > Crawler tab: Role Simulation and Cookie Simulation.

    Mobile view is controlled via the Cache Mobile setting on the LiteSpeed Cache > Settings > Cache tab. Let’s look at each of these configurations.

    User Role Simulation

    The main advantage of a crawler is that it minimizes the chances that your visitors will encounter uncached content. This is a nice perk for your guests. But what if you have the kind of site where many of your visitors log in? Maybe you have a particular user role that you would like to see warmed up with a crawler?

    Navigate to LiteSpeed Cache > Settings > Crawler and add a user ID to the Role Simulation box.

    In this example, we entered the ID 2. User number 2 has the role of Editor, so now we have two crawlers:

    Now, in addition to crawling the sitemap from the point of view of a non-logged-in user, LSCache will crawl the sitemap from the point of view of a user with the Editor role.

    Of course, with more crawlers comes more server load. So you should consider the benefits of a warm cache in the context of how many resources you have available.

    Cookie Simulation

    What if you have implemented a cache vary based on a cookie value. Wouldn’t it be nice to crawl that view, too? There aren’t many situations where you would need to simulate a cookie crawler, but it can be useful for sites that use a cookie to control multiple languages or currencies.

    To create a new crawler for a particular cookie, press the + button. Enter the cookie name, and the values you wish to crawl for. Values should be one per line, and can include a blank line.

    There will be one crawler created per cookie value, per simulated role. In other words, this:

    Press the + button to add additional cookies, but be aware the number of crawlers grows quickly with each new cookie, and can be a drain on system resources. Let’s add cookie2 with the values C, D, and .

    One cookie, eight additional crawlers!

    This is a cool feature, but be careful with it, or your server will never get a break from all of the crawling!

    Mobile View

    One last type of crawler is the Mobile Crawler. This one is automatically created if you have LiteSpeed Cache > Settings > Cache > Cache Mobile set to ON.

    Just for fun, let’s see what happens to your crawler list when you crawl a mobile view:

    As you have probably guessed, it doubles the number of crawlers you will run.

    In Conclusion

    You can create crawlers for many different cache vary situations. It’s a handy tool, just remember to crawl responsibly.


    Disclaimer: The information contained in this post is accurate for LSCWP v2.8 [release log]. If you are using a newer version of the plugin, some details may have changed. Please refer to our wiki for the latest!

    Have some of your own ideas for future WordPress Wednesday topics? Leave us a comment!

    We’ll be back soon with another installment. In the meantime, here are a few other things you can do: