LiteSpeed Cache (LSCache)

From Hostek.com Wiki
Jump to: navigation, search

Summary

LiteSpeed Cache (LSCache) is a server-level caching solution offered by an alternative to Apache called LiteSpeed. While LiteSpeed itself offers many advantages, LSCache works hand-in-hand with LiteSpeed to create an even more efficient and fast environment for your website.


LiteSpeed Cache for WordPress (LSCWP)

LiteSpeed Cache for WordPress is a highly customizable web server-level caching plugin that utilizes LiteSpeed Cache. It is designed to dramatically increase WordPress site speed with little to no configuration necessary. As mentioned earlier, by caching at the web server layer, overhead is cut drastically allowing caching to be done more quickly and efficiently than in any other caching solution.


Installation on a Shared cPanel Server

If you are on a shared cPanel/Linux server and have been directed to this page via e-mail, you are part of our beta LSCWP program! We strongly encourage you to take advantage of this free speed-boosting plugin. To do so, please perform the following steps:

  1. Log into your WordPress website.
  2. Click 'Plugins' on the left.
    LSCache1r.png
  3. Very Important: Deactivate any other caching plugins like W3 Total Cache on your website, so that LiteSpeed Cache is the only WordPress caching plugin enabled. If you skip this step, LiteSpeed Cache will not work.
  4. Still within the WordPress admin, scroll down on the left until you see LiteSpeed Cache. Click that.
    LSCache2.png
  5. Click the 'DB Optimizer' tab on the new page.
    LSCache3.png
  6. Click the 'Clean All' button. After that, click 'Optimize Tables' button.
    LSCache4.png
  7. That's it! You have activated LiteSpeed Cache and optimized your WordPress database at the same time. You can either go through all the pages on your site so that they get cached, or you can let the automated crawler do so (see FAQ).



Installation on a VPS

Note: This section is for clients whom have purchased their own private server. If your website is on a Hostek.com shared server, please read the section above.

As a prerequisite, your server must have LiteSpeed with LSCache. To get this speed-boosting upgrade, please contact Hostek.com support by clicking here and mention this wiki page.

  1. Login into WHM for your server (http://<Your Server's IP>:2086/).
  2. At the top-left, type in 'LiteSpeed'. There should be one result (LiteSpeed Web Server), click it.
  3. Under 'LiteSpeed Cache for WordPress Management', click 'Manage Cache Installations'.
  4. In this section, click 'scan'. LiteSpeed will now scan for all of the WordPress sites on the server.
  5. Once the scan is finished, go back to the 'Manage Cache Installations' page.
  6. Simply check the box on the left for the websites(s) you want to enable LiteSpeed Cache for, then scroll back up and click 'Enable Selected'. This will install the LiteSpeed WordPress plugin and connect configs on the LiteSpeed back-end for the sites you chose.
  7. Next, log into the site's WordPress admin, then go to Plugins.
  8. Very Important: Deactivate any other caching plugins like W3 Total Cache on your website, so that LiteSpeed Cache is the only one. If you skip this step, LiteSpeed Cache will not work.
  9. Still within the WordPress admin, scroll down on the left until you see LiteSpeed Cache. Click that.
  10. Click the 'DB Optimizer' tab on this new page, then click the 'Clean All' button. After that, click 'Optimize Tables' button at the bottom-right.
  11. That's it! You have activated LiteSpeed Cache and optimized your WordPress database at the same time. You can either go through all the pages on your site so that they get cached, or you can let the automated crawler do so (see FAQ).



Frequently Asked Questions

Please Note: Other caching plugins are not compatible with LSCache. See final question for more details.


"Why is LSCWP/LSCache faster than other caching plugins?"

Unlike most other caching plugins, LSCache works by caching pages on a server-level. It can do this because it has access to LiteSpeed, and through that the server as a whole. The first time a page loads it may load at normal rates, for that's the time it is getting placed into the server cache. After that, it will load almost instantly for everyone, as it is pulled from the server cache instead of the web server. Normal caching plugins work by caching pages on a client/browser level, which is much less efficient, as every person browsing the site will have to load the pages themselves before they are cached on their local machine instead of the server.

"How do I configure LSCache?"

You can modify a plethora of technical features by going to Plugins -> LiteSpeed Cache -> Settings. There are many tabs of configuration variables you and your developers can modify at that location. This is not to say you need to-- LSCache comes out-of-the-box with many settings already configured to optimal values for most websites.

"If a page is changed, will the changed be cached again automatically?"

LSCache comes with what is called a crawler that checks each page of your website for changes. When it detects that a cached page is changed, it will re-cache the page automatically. It does this every 400 seconds, so changes you make will indeed quickly be cached once more. This 400 second value can be changed by going to Plugins -> LiteSpeed Cache -> Settings as mentioned in the previous question.

"Is there a way to force a page to re-cache?"

To 'force-reload' a page into the cache, all it will take is simply loading the page once through the browser. LSCache will detect that it hasn't been cached before (or if a different version of it was cached) and it will automatically update. The aforementioned crawler will also do this every 400 seconds.

"Why Can't I use other caching plugins in conjunction with LSCache?"

LSCache uses certain protocols that do not work when other caching plugins like W3 Total Cache are enabled. Please only enable one at a time, though for the reasons above we strongly suggest sticking with LSCache as your main WordPress caching solution.


If you have a question that is not listed, please feel free to contact Hostek.com support by clicking here.