{"id":83611,"date":"2023-03-22T13:26:26","date_gmt":"2023-03-22T17:26:26","guid":{"rendered":"https:\/\/www.boldgrid.com\/support\/?p=83611"},"modified":"2024-12-05T10:08:21","modified_gmt":"2024-12-05T15:08:21","slug":"openlitespeed-setup","status":"publish","type":"post","link":"https:\/\/www.boldgrid.com\/support\/w3-total-cache\/openlitespeed-setup\/","title":{"rendered":"How to set up OpenLiteSpeed and W3 Total Cache"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><h2 class=\"wp-block-heading\" id=\"introduction\">Introduction<\/h2>\r\n\r\n\r\n\r\n<p><span style=\"font-weight: 400;\">LiteSpeed servers have been around for many years, and W3 Total Cache has been and remains fully compatible out of the box.<\/span><\/p>\r\n<p><span style=\"font-weight: 400;\">However, the same couldn&rsquo;t be said for OpenLiteSpeed (the free version of LiteSpeed) for several reasons:<\/span><\/p>\r\n<ul>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">OLS does not support all Apache rules, some of which W3TC utilized for various features<\/span><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">OLS requires a restart in order to apply configuration changes, which W3TC can&rsquo;t trigger directly for security reasons<\/span><\/li>\r\n<\/ul>\r\n<p><span style=\"font-weight: 400;\">We&rsquo;re happy to announce that as of W3 Total Cache v3.3.1, all W3TC features are now fully compatible with both LiteSpeed Enterprise and OpenLiteSpeed!<\/span><\/p>\r\n<p><span style=\"font-weight: 400;\">This article will walk you through configuring W3 Total Cache with OpenLiteSpeed.<\/span><\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h2>\r\n\r\n\r\n\r\n<p>Before following the steps below, you&rsquo;ll first need to ensure you&rsquo;re on an OpenLiteSpeed server and have WordPress installed. If you need some help getting that set up then check out the <a href=\"https:\/\/openlitespeed.org\/kb\/wordpress\/\" target=\"_blank\" rel=\"noopener\">OpenLiteSpeed and WordPress installation guide<\/a>.<\/p>\r\n\r\n\r\n\r\n<h2 id=\"configuring-openlitespeed-with-w3-total-cache\">Configuring OpenLiteSpeed with W3 Total Cache<\/h2>\r\n\r\n\r\n\r\n<p>Things you will need.<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Root access to your OpenLiteSpeed Web Server<\/li>\r\n\r\n\r\n\r\n<li>Administrative access to your WordPress installation<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>In order to utilize W3 Total Cache in your WordPress installation hosted on an OpenLiteSpeed Web Server simply follow these steps.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Install and activate the W3 Total Cache plugin<\/li>\r\n<li>As the root user, modify the OpenLiteSpeed virtual host configuration file (<code>usr\/local\/lsws\/conf\/vhosts\/example.com\/vhconf.conf<\/code> or similar path) to add a line to include the <code>litespeed.conf<\/code> file generated by W3 Total Cache.<br><code>include \/home\/someuser\/public_html\/litespeed.conf<\/code><code><\/code><\/li>\r\n\r\n\r\n\r\n\r\n\r\n<li>Configure the W3 Total Cache plugin as desired. This should update the copied\/symlinked configuration file located in your WordPress installation root directory.<\/li>\r\n<!-- \/wp:post-content -->\r\n\r\n<!-- wp:list-item -->\r\n<li>Restart the OpenLiteSpeed server to apply the changes to the configuration file. This can be accomplished either by the OpenLiteSpeed web console or via command line.<!-- wp:list {\"ordered\":true} -->\r\n<ul><!-- wp:list-item -->\r\n<li><strong>Option 1 : Web Console &ndash;<\/strong> On the OpenLiteSpeed main navigation menu, select Services and look for OpenLiteSpeed. You will see a switch which you can click and select Restart.<\/li>\r\n<!-- \/wp:list-item -->\r\n\r\n<!-- wp:list-item -->\r\n<li><strong>Option 2 : Command Line &ndash;<\/strong>&nbsp; <code>systemctl restart lsws<\/code><\/li>\r\n<!-- \/wp:list-item --><\/ul>\r\n<!-- \/wp:list --><\/li>\r\n<!-- \/wp:list-item --><\/ol>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>That&rsquo;s it! Once the OpenLiteSpeed Web Server successfully restarts, W3 Total Cache should function without issue. Be aware however that the above process will need to be applied each time changes are made to the W3 Total Cache configuration in order for certain features and\/or settings to apply under OpenLiteSpeed.<\/p>\r\n<!-- \/wp:paragraph --><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Introduction LiteSpeed servers have been around for many years, and W3 Total Cache has been and remains fully compatible out of the box. However, the same couldn&rsquo;t be said for OpenLiteSpeed (the free version of LiteSpeed) for several reasons: OLS does not support all Apache rules, some of which W3TC utilized for various features OLS [&hellip;]<\/p>\n","protected":false},"author":880,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[738,692],"tags":[],"class_list":["post-83611","post","type-post","status-publish","format-standard","hentry","category-w3tc-getting-started","category-w3-total-cache"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/83611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/users\/880"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/comments?post=83611"}],"version-history":[{"count":13,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/83611\/revisions"}],"predecessor-version":[{"id":86058,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/83611\/revisions\/86058"}],"wp:attachment":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/media?parent=83611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/categories?post=83611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/tags?post=83611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}