WpW: What is LiteSpeed Cache and how did it get here?

WordPress Wednesday: What is LiteSpeed Cache and How Did it Get Here?

Written by

in

WordPress Wednesday: What is LiteSpeed Cache and How Did it Get Here?

Welcome to another installment of WordPress Wednesday!

You’re a site owner, minding your own business, tending to your WordPress sites, and then one day you notice it: LiteSpeed Cache. It’s just sitting there in your list of active plugins, but you don’t remember installing it. How did it get there? What does it do? Read on to find out!

How did it get there?

Chances are your hosting provider put it there.

Hosting companies that are powered by LiteSpeed Web Server have access to a cache manager function that can automatically install and enable the LiteSpeed Cache plugin on every WordPress installation they host. If this is what has happened with your site, a message similar to the following should have been displayed in the WordPress dashboard:

What is LiteSpeed Cache

If you are having an issue and do not have time to read any further or to troubleshoot, you may deactivate the plugin. Navigate to WP Admin > Plugins > Installed Plugins and click on Deactivate under LiteSpeed Cache.

If you are having an issue and you do have time to troubleshoot, keep reading. If this article doesn’t answer all of your questions, drop by the support forum and we’ll be happy to help.

What does LiteSpeed Cache do?

WordPress sites consist of dynamic pages that are built with PHP. The pages of a WP site don’t exist anywhere in the file system; they are constructed on-demand through PHP, and then served to the visitor as HTML. This can be a resource-heavy process, and the LiteSpeed Cache for WordPress plugin is one way of dealing with it.

When WP dynamically generates the static HTML page, LSCache communicates with LiteSpeed Web Server to store a copy of it. Once the static copy exists in the cache, then that copy can be served to future visitors, eliminating the expensive WordPress PHP process for all but the first visitor to request the page.

When your site is cached, it requires much less involvement from the WordPress backend, which translates into a faster site and a better experience for your site’s visitors.

What is LiteSpeed Cache

Think of it like baking: do you assemble the ingredients anew and turn on the oven every time a visitor to your house wants some dessert? No! You go through the baking process once for your first visitor, and then serve to each of your subsequent visitors from the finished dish. It’s faster and far more efficient.

LiteSpeed Cache is to your WordPress site as a pan of baked berry crisp is to dessert: quick and easy to serve, because all of the work of assembling the ingredients and baking them together has already been done.

If you’d like to know more about how LiteSpeed Cache works, or the concept of Caching in general, take a look at our Caching 101 articles. If you want to play around with some settings, visit our wiki for an explanation of what each of the settings means. If you’d like to see how a WordPress site with LSCache performs against a WordPress site without it, our benchmarks are a good place to start.

Why does my hosting provider want this?

You’ve seen above what LSCache can do for you. But what’s in it for your hosting provider?

As we mentioned previously, generating WordPress pages can be resource-intensive. With LSCache providing some relief, hosting providers can get better performance for all of the WordPress sites they host (including yours) while using fewer resources. It’s a win for everyone involved!

Specifically:

  • LiteSpeed’s cache module is integrated directly into LiteSpeed Web Server, which makes for a shorter server stack and allows it to work more efficiently than any other WordPress cache plugin.
  • With fewer resources being used for each client, hosting providers can offer their services to more clients without purchasing additional hardware, or negatively impacting the performance of their existing clients’ sites.
  • With LiteSpeed-provided control panel plugins and command-line-interface scripts, hosting providers can easily manage all of the WordPress installations on their servers with one or two simple commands.

Do I have a choice?

Always! Let’s go back to that hosting provider function that we mentioned at the beginning. Its job is to autodiscover WordPress installations, install LSCache, and enable it. Sites are skipped if they already have another cache plugin in place, or if a file called .litespeed_flag exists in the WordPress root directory.

If you do not want any caching at all on your site, you have two options:

  1. Deactivate the plugin and leave it installed
  2. Deactivate the plugin, uninstall it and create the .litespeed_flag file in your WordPress root directory

If you choose option #2 and are not comfortable doing it yourself, your hosting provider should be able to help you create the file.

Of course, we hope you will leave LiteSpeed Cache installed on your site! If you are still unsure, or if you have any questions we haven’t answered here, please drop by the support forum. We are always happy to assist.

P.S. If I have made you hungry for berry crisp with the images and the analogy in this post, the least I can do is share the recipe 🙂

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:

Comments

10 responses to “WpW: What is LiteSpeed Cache and how did it get here?”

  1. Matt Avatar

    Litespeed was installed automatically on my site, it conflicted with the caching plugin I was already using and didn’t work properly even after I resolved that problem. Honestly I’d have been really happy to try this out if my hosts had just e-mailed me and said, but to go around automatically installing plugins into peoples WordPress sites, no matter how well meaning you are, is a bit much, please stop.

    1. Lisa Clarke Avatar
      Lisa Clarke

      Hi, Matt.

      To be clear, LiteSpeed hasn’t automatically installed LSCWP anywhere. We provide a tool to hosting providers, and it is entirely that company’s decision to auto-install the plugin on the sites that they host.

      That said, under normal circumstances, LSCWP should not be auto-installed on any site that is already using a caching plugin. We’ve just been made aware of a bug in the latest version of the auto-enable script that was ignoring this rule in some cases. We will have a fix in the next WHM plugin release (very soon).

      Please accept our apologies. LSCWP should not have been installed on your site. It’s not our intention to force anyone to stop using a caching solution they already enjoy! To go back to your original plugin, simply deactivate LiteSpeed Cache and reactivate the other one.

      Let us know if you have any other questions or problems!

  2. Nelson Avatar

    Happened to me just yesterday. Seems sites are no longer skipped if there’s already another cache plugin in place because I have WP Fastest Cache but LiteSpeed Cache was still installed and activated.

    Also, I’m not sure entirely if it was related to my host’s upgrade to LiteSpeed Web Server, but my .htaccess files suddenly had the entry below, busting up my WordPress sites since most plugins now require PHP 7.

    # php — BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php56” package as the default “PHP” programming language.

    AddHandler application/x-httpd-ea-php56___lsphp .php .php5 .phtml

    # php — END cPanel-generated handler, do not edit

    1. Lisa Clarke Avatar
      Lisa Clarke

      Thank you for letting us know. The process is supposed to respect any other cache plugins you have installed. I’ll pass this along to our team. Apologies for any inconvenience! In the meantime, if you want to stick with WP Fastest Cache, you can either leave the LSCache plugin installed but deactivated, or you can add the `.litespeed_flag` file in your WP root directory (or contact your hosting provider to flag your site for you).

      As far as the `.htaccess` code goes, I’m not sure why the default PHP would have been changed to 5.6. You might want to ask your hosting provider about that one.

      Welcome to LiteSpeed 🙂 Feel free to join our Slack if you have any more questions or issues!

    2. Lisa Clarke Avatar
      Lisa Clarke

      Hello again. Our developer had a look at our plugin as well as the WP Fastest Cache code, and it looks to him like your site should have been skipped. I wonder if it’s possible that your hosting provider has overridden that behavior with some custom code.

      If you’d like us to look into this further, and you can reproduce it on your end, we’d be happy to. You can create a ticket through our client area or by sending email to support@litespeedtech.com.

  3. TOBILOBA BALOGUN Avatar

    I think it’s really crap for the host or light speed to just install a plugin on a website without informing the site owner. It’s utter nonsense. Is this the way they will install bugs on our website without our content? You’re all mad. We paid for the hosting service, it is not free, so stop acting like you;re doing us a favor.

    1. Lisa Clarke Avatar
      Lisa Clarke

      To be clear, LiteSpeed did not install any software on your site. We do provide a tool, but mass installation is always the hosting provider’s choice. The tool is built to respect any previously installed caching plugins, and LSCache should only be installed on your site if you don’t already have a caching solution. (If that didn’t happen, please let us know and we will look into it.)

      We are sympathetic, but if you wish to complain about the way the rollout was handled, that would be a conversation to have with your hosting company.

    2. Tunnelgist Avatar

      Abi ooooo bro . I wonder how plugin go just automatically index itself

  4. Henry Avatar

    On my site’s admin area, I’m experiencing

    403
    Forbidden
    Access to this resource on the server is denied!

    And they wrote that it’s Proudly powered by LiteSpeed Web Server.

    What’s that suppose to mean?

    1. Lisa Clarke Avatar
      Lisa Clarke

      This means that your hosting provider is using LiteSpeed Web Server to serve your site’s content. If you are experiencing 403 errors, contact your hosting provider’s support. They should be able to help you figure out what the problem is.

Leave a Reply

Your email address will not be published. Required fields are marked *