{"id":899,"date":"2025-12-28T08:05:07","date_gmt":"2025-12-28T07:05:07","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=899"},"modified":"2026-02-18T23:16:25","modified_gmt":"2026-02-18T22:16:25","slug":"using-litespeed-cache-without-using-plugins","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/using-litespeed-cache-without-using-plugins\/","title":{"rendered":"Using LiteSpeed Cache Without Using Plugins"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">Even if you don&#8217;t use popular CMS scripts like &#8220;<strong>WordPress<\/strong>&#8221; or <em><strong>&#8220;PrestaShop&#8221;<\/strong><\/em>, you can take advantage of the acceleration of your website by using <em><strong>the &#8220;LiteSpeed Cache&#8221;<\/strong><\/em> that we provide as part of our services.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/using-litespeed-cache-without-using-plugins\/#Basic_rule_in_htaccess_file\" >Basic rule in .htaccess file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/using-litespeed-cache-without-using-plugins\/#Three_forms_%E2%80%93_public_cache_private_cache_no_cache\" >Three forms &#8211; public cache, private cache, no cache<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/using-litespeed-cache-without-using-plugins\/#Emptying_Memory_Using_the_Command_Line\" >Emptying Memory Using the Command Line<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Basic_rule_in_htaccess_file\"><\/span>Basic rule in .htaccess file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;IfModule LiteSpeed&gt;\nCacheEnable public\nRewriteEngine On\nRewriteCond %{REQUEST_METHOD} ^GET|HEAD$\nRewriteCond %{HTTP_HOST} ^your-domain-name.com &#91;NC]\nRewriteRule .* - &#91;E=Cache-Control:max-age=120]\n&lt;\/IfModule&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note that the above example assumes the cache of the entire website and that it is completely static, i.e. it is a company website, where changes are not made very often, and if they are introduced, it is not critical for the update to take place immediately. In the example above, the refresh occurs at intervals of 120 seconds, so the change will be visible to visitors after 2 minutes.<\/p>\n\n\n\n<\/div>\n\n<div id=\"mybox-2286442543\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Early access<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Still need help?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contact our customer service team.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Message us<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">Explanation of each option from the example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CacheEnable Public<\/strong> &#8211; Activate Public Cache Usage<\/li>\n\n\n\n<li><strong>RewriteEngine On <\/strong>&#8211; Activate Rewrite Option<\/li>\n\n\n\n<li><strong>RewriteCond %{REQUEST_METHOD} ^GET|HEAD$ <\/strong>&#8211; reading headers<\/li>\n\n\n\n<li><strong>RewriteCond %{HTTP_HOST} ^your-domain-name.com [NC] <\/strong>&#8211; indicate the domain name for the rules<\/li>\n\n\n\n<li><strong>RewriteRule.* &#8211; [E=Cache-Control:max-age=120] <\/strong>&#8211; specify how often the cache should be refreshed<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Three_forms_%E2%80%93_public_cache_private_cache_no_cache\"><\/span>Three forms &#8211; public cache, private cache, no cache<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is worth remembering that there are three forms of cache use. These are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>public cache<\/strong> &#8211; where we deal with pages that can be considered relatively static, i.e. those whose content does not change very often.<\/li>\n\n\n\n<li><strong>private cache<\/strong> &#8211; in the case when websites are served using SSL and where the accounts of website users \/ customers and sessions maintained in cookies appear<\/li>\n\n\n\n<li><strong>no cache<\/strong> &#8211; when pages contain forms, the appearance of new content on pages is a critical element, e.g. pages containing news<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Emptying_Memory_Using_the_Command_Line\"><\/span>Emptying Memory Using the Command Line<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you need to force a cache wipe on the server, in addition to the validity time specified in the .htaccess file, you can also use the command issued from the command line during the connection <a href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/\">SSH<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -i -X PURGE http:\/\/your-domain-name.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>For more information on configuring LiteSpeed Cache using rules in the .htaccess file, see the manufacturer&#8217;s documentation:<\/em><br><em><a href=\"https:\/\/www.litespeedtech.com\/support\/wiki\/doku.php\/litespeed_wiki:cache:no-plugin-setup-guidline\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.litespeedtech.com\/support\/wiki\/doku.php\/litespeed_wiki:cache:no-plugin-setup-guidline<\/a><\/em><\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[25,17],"manual_kb_tag":[445,1319,531,1320,588,1321,718,1322,721,1323,722,1324,723,1325,765,1326,766,1327,772,1328,818,1329,850,1330,1315,1331,1316,1332,1317,1333,190,1318,1334],"class_list":["post-899","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-hosting","manualknowledgebasecat-elastic-web-hosting","manual_kb_tag-prestashop","manual_kb_tag-max-age","manual_kb_tag-domain-name","manual_kb_tag-rewrite-rules","manual_kb_tag-website","manual_kb_tag-rewrite-engine","manual_kb_tag-htaccess-file","manual_kb_tag-cache-purge","manual_kb_tag-rewriteengine","manual_kb_tag-cache-invalidation","manual_kb_tag-rewriterule","manual_kb_tag-website-acceleration","manual_kb_tag-rewritecond","manual_kb_tag-static-website","manual_kb_tag-litespeed","manual_kb_tag-command-line","manual_kb_tag-litespeed-cache","manual_kb_tag-curl-command","manual_kb_tag-domain","manual_kb_tag-request-headers","manual_kb_tag-php","manual_kb_tag-domain-name-rules","manual_kb_tag-http","manual_kb_tag-cache-refresh","manual_kb_tag-public-cache","manual_kb_tag-cache-configuration","manual_kb_tag-private-cache","manual_kb_tag-session-cookies","manual_kb_tag-no-cache","manual_kb_tag-cache-enable","manual_kb_tag-wordpress","manual_kb_tag-cache-control","manual_kb_tag-no-plugin-setup"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/899\/revisions"}],"predecessor-version":[{"id":6530,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/899\/revisions\/6530"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=899"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=899"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}