{"id":11112,"date":"2023-04-11T17:07:20","date_gmt":"2023-04-11T11:37:20","guid":{"rendered":"https:\/\/www.mconnectmedia.com\/blog\/?p=11112"},"modified":"2023-04-12T17:30:31","modified_gmt":"2023-04-12T12:00:31","slug":"litemage-cache-for-magento-2-installation-guide","status":"publish","type":"post","link":"https:\/\/www.mconnectmedia.com\/blog\/2023\/04\/11\/litemage-cache-for-magento-2-installation-guide\/","title":{"rendered":"LiteMage Cache For Magento 2 \u2013 Ultimate Installation Guide"},"content":{"rendered":"<p>The LiteMage Cache is the world&#8217;s quickest Magento 2 full page cache. LiteMage is a Magento 2 extension that works with LiteSpeed Web Server installation and its built-in page cache to speed up Magento 2 store and keep customers coming back.<\/p>\n<p>This <strong>LiteMage cache<\/strong> is three times quicker than other caching systems, including Apache with Varnish and NGINX with Varnish. It provides a better caching solution by improving performance and quality. It improves the speed of both static and dynamic content.<\/p>\n<p>LiteMage, which is integrated directly into LiteSpeed Web Server control panel, shortens server stack and eliminates overhead. LiteMage, which is <strong>built on LSCache<\/strong> and created for Magento 2, can generate both public and private blocks from cache via hole-punching using ESI.<\/p>\n<p>This post will walk you through the whole process of installing LiteMage Cache on Web Hosting or Managed Cloud Server.<\/p>\n<blockquote><p><strong>Also Read:\u00a0<a href=\"https:\/\/www.mconnectmedia.com\/blog\/improve-magento-store-page-load-time\/\">6 Effective Ways To Improve Magento Store Page Load Time<\/a><\/strong><\/p><\/blockquote>\n<h2><strong>What is LiteMage Cache for Magento 2?<\/strong><\/h2>\n<p><strong>LiteMage Cache<\/strong> is a full-page caching <strong>extension for Magento 2<\/strong> that is intended to increase your website&#8217;s speed. It is a proprietary extension created by LiteSpeed Technologies, the same company that created LiteSpeed Web Server.<\/p>\n<p>The extension was created particularly for use with LiteSpeed Web Server, which is noted for its great performance and minimal resource utilization. To provide speedy page loads to your visitors, <strong>LiteMage Cache<\/strong> uses a combination of server-side caching and client-side caching.<\/p>\n<p>One of LiteMage store&#8217;s primary benefits is its ability to store full pages, including dynamic content. This ensures that even pages with personalized content, such as customer-specific pricing or product suggestions, will load quickly on website.<\/p>\n<p>Other speed optimization features in LiteMage Cache include lazy image loading, automated image optimization, and JavaScript magnification. These capabilities can assist increase the speed and performance of your <strong><a href=\"https:\/\/www.mconnectmedia.com\/magento-2-development-solutions\">Magento 2 website development<\/a><\/strong> even more.<\/p>\n<p>Overall, LiteMage Cache is a strong caching solution that may assist your<strong> Magento 2<\/strong> website&#8217;s speed and user experience. However, it needs the installation of LiteSpeed Web Server on your server, which may not be an option for many users.<\/p>\n<h3><strong>Features of LiteMage Cache <\/strong><\/h3>\n<p>LiteMage Cache delivers enhanced caching with ESI implementation tailored exclusively for Magento by combining the <strong>LiteMage Magento Extension<\/strong> and an updated version of LiteSpeed Cache.<\/p>\n<ul>\n<li>Caching might be static or dynamic.<\/li>\n<li>Supports multiple stores, currencies, and user groups.<\/li>\n<li>A built-in spider is used to refresh the cache.<\/li>\n<li>Low memory and CPU necessities: The biggest downside of varnish is that it uses more RAM. LiteMage, on the other hand, consumes extremely little and performs better than varnish.<\/li>\n<li>DDoS protection: LiteMage has DDoS protection, which shields websites from regular HTTP assaults.<\/li>\n<li>Quick page loads: LiteMage speeds up your pages by retrieving several content blocks with a single request.<\/li>\n<li>Native SSL support: Because other Magento cache extensions do not support native SSL, this is one of the most important aspects of LiteMage.<\/li>\n<li>Scalability: It can handle 10000\u2019s of connections without error, therefore it never slows down the website.<\/li>\n<\/ul>\n<blockquote><p><strong>Also read:\u00a0<a href=\"https:\/\/www.mconnectmedia.com\/blog\/magento-2-common-issues\/\">Magento 2 Common Issues You Need to Know To Run Your Store Safely<\/a><\/strong><\/p><\/blockquote>\n<h3><strong>LiteMage Integration Prerequisites for Magento 2<\/strong><\/h3>\n<p>If you are using Magento Enterprise, you must also disable &#8220;Page Cache.&#8221;<\/p>\n<p><strong>PHP Prerequisites<\/strong><\/p>\n<p>LiteMage integration requirements for Magento 2:<\/p>\n<p>Magento 2 needs PHP 7.0.2 or later, 5.6.x, or 5.5.x. Use <code class=\"codetag\">php -v<\/code> in the command line to retrieve the php version utilized by the command line interface. To find the directory of the php binary, use the command <code class=\"codetag\">which php<\/code>. Then, as a backup, change the current binary name to something else (e.g. <code class=\"codetag\">mv php php-orig<\/code>).<\/p>\n<p>Finally, create a symbolic link or copy the binary from the LSWS directory to the directory provided by the <code class=\"codetag\">which<\/code> command. If the <code class=\"codetag\">which<\/code> command produces no results, we recommend using <code class=\"codetag\">\/usr\/local\/bin\/<\/code> or <code class=\"codetag\">\/usr\/bin\/<\/code>.<\/p>\n<p>Using PHP 7 with <code class=\"codetag\">which<\/code> returning \/usr\/bin\/php:<\/p>\n<blockquote><p><code class=\"codetag\">mv \/usr\/bin\/php \/usr\/bin\/php-orig<\/code><\/p>\n<p><code class=\"codetag\">ln -s \/usr\/local\/lsws\/lsphp70\/bin\/php \/usr\/bin\/php<\/code><\/p><\/blockquote>\n<p>After that, execute php -v. If the steps were followed properly, the version number should match the php version on the server.<\/p>\n<h3><strong>Installation of LiteMage for Magento 2<\/strong><\/h3>\n<p>The actions that follow presume that the prerequisites listed above are satisfied. Follow these instructions to install LiteMage on Magento 2:<\/p>\n<ul>\n<li>Access SSH into your account<\/li>\n<li>Go to the Magento 2 installation directory. For instance, type<\/li>\n<\/ul>\n<blockquote><p>cd ~\/public_html\/magento<\/p><\/blockquote>\n<ul>\n<li>To activate Magento developer mode, use the following line at the command prompt:<\/li>\n<\/ul>\n<blockquote><p>php bin\/magento deploy:mode:set developer<\/p><\/blockquote>\n<ul>\n<li>Type the following command to download the LiteMage plugin files:<\/li>\n<\/ul>\n<blockquote><p>wget https:\/\/github.com\/litespeedtech\/magento2-LiteSpeed_LiteMage\/archive\/master.zip<\/p><\/blockquote>\n<ul>\n<li>Unzip the source package. The magento2-LiteSpeed LiteMage-master should be the name of unzipped directory.<\/li>\n<\/ul>\n<blockquote><p>unzip master.zip<\/p><\/blockquote>\n<ul>\n<li>In Magento 2 root directory, use the following command to create a directory folder for the LiteMage plugin files:<\/li>\n<\/ul>\n<blockquote><p>mkdir -p app\/code\/Litespeed\/Litemage<\/p><\/blockquote>\n<ul>\n<li>Use the following command to move the unpacked LiteMage plugin files to the newly formed directory:<\/li>\n<\/ul>\n<blockquote><p>mv magento2-LiteSpeed_LiteMage-master\/* app\/code\/Litespeed\/Litemage\/<\/p><\/blockquote>\n<ul>\n<li>Check that the owner of the contents matches the owner of the other magento store files.<\/li>\n<li>Type the following command to enable the LiteMage plugin in Magento 2<\/li>\n<\/ul>\n<blockquote><p>php bin\/magento module:enable Litespeed_Litemage<\/p><\/blockquote>\n<ul>\n<li>Type command to make the plugin configuration visible to the Magento 2 Admin panel<\/li>\n<\/ul>\n<blockquote><p>php bin\/magento setup:upgrade<\/p><\/blockquote>\n<ul>\n<li>Type the commands to recompile Magento:<\/li>\n<\/ul>\n<p>If you are using Magento 2 and have one Magento store, perform the command<\/p>\n<blockquote><p>php bin\/magento setup:di:compile<\/p><\/blockquote>\n<ul>\n<li>Use command to return Magento to production mode<\/li>\n<\/ul>\n<blockquote><p>php bin\/magento deploy:mode:set production<\/p><\/blockquote>\n<p><strong>Tips:<\/strong> If you get an error message when running this command, go back to above step and try again.<\/p>\n<ul>\n<li>Return to production mode if desired. Following mode transition, the preceding procedure may need to be repeated.<\/li>\n<\/ul>\n<h3><strong>Enable the LiteMage After installation<\/strong><\/h3>\n<p>Follow these steps to enable LiteMage on Magento 2:<\/p>\n<ul>\n<li>To enable LiteMage module, add the following code to the Magento root folder&#8217;s .htaccess file:<\/li>\n<\/ul>\n<blockquote><p>&lt;IfModule LiteSpeed&gt;<\/p>\n<p>LiteMage on<\/p>\n<p>&lt;\/IfModule&gt;<\/p><\/blockquote>\n<ul>\n<li>Log into the Magento administration page.<\/li>\n<li>Make sure LiteMage is enabled and the Whole Page Cache option has LiteMage selected in Store -&gt; Configuration -&gt; Advanced -&gt; System.<\/li>\n<li>Refresh configurations and page cache under System -&gt; Cache Management.<\/li>\n<li>Choose Refresh from the list box above the table, then click Submit.<\/li>\n<\/ul>\n<h3><strong>How To Test?<\/strong><\/h3>\n<p>Visit a page with an active cache to test that LiteMage is working properly. Next, by right-clicking the page and selecting &#8220;inspect,&#8221; you may access the browser&#8217;s inspector.<\/p>\n<p>Reload the webpage by clicking the &#8220;Network&#8221; tab.<\/p>\n<p>Now, choose the item from the list that corresponds to current HTML page (usually the first item ending in .html).<\/p>\n<p>Check the response header for the following LiteMage-related information under &#8220;Headers.&#8221;<\/p>\n<blockquote><p>X-LiteSpeed-Cache: hit,litemage<\/p><\/blockquote>\n<p>Please reload the page and check again if you see X-LiteSpeed-Cache: miss,litemage.<\/p>\n<blockquote><p><strong>Also Read:\u00a0<a href=\"https:\/\/www.mconnectmedia.com\/blog\/magento-2-admin-panel-slow\/\">Is Your Magento 2 Admin Panel Slow? Speed Up with These Tactics Now<\/a><\/strong><\/p><\/blockquote>\n<h3><strong>Conclusion<\/strong><\/h3>\n<p>To summarize, we&#8217;ve shown how to include LiteMage into Magento 2. We have finally completed the integration procedure with the help of <strong><a href=\"https:\/\/www.mconnectmedia.com\/magento-support-services-services\">our Magento support services<\/a><\/strong>. If you require any more support, please do not hesitate to <strong><a href=\"https:\/\/www.mconnectmedia.com\/contact\">contact us<\/a><\/strong>.<\/p>\n<h3><strong>Frequently Asked Questions<\/strong><\/h3>\n<ul>\n<li><strong>\u00a0How to manage cache in magento 2?<\/strong><\/li>\n<\/ul>\n<p>Cache Management page displays the status of each primary cache and the tag assigned to it. To flush the cache or use the all-inclusive Cache Storage, click the huge buttons in the upper-right corner. There are extra buttons at the bottom of the page to flush the catalogue product picture cache and the JavaScript\/CSS cache.<\/p>\n<ul>\n<li><strong>How many types of cache are there in magento 2?<\/strong><\/li>\n<\/ul>\n<p>All 14 types of Magento 2 Cache are efficient in enhancing performance and helping your Shop function better with diverse usages.<\/p>\n<ul>\n<li><strong>How to enable full page cache magento 2?<\/strong><\/li>\n<\/ul>\n<p>Enter the following command on the Magento 2 command line to activate all cache: activate cache in php bin\/magento. Enter the cache types you want to enable, separated by spaces.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The LiteMage Cache is the world&#8217;s quickest Magento 2 full page cache. LiteMage is a Magento 2 extension that works with LiteSpeed Web Server installation<\/p>\n","protected":false},"author":1,"featured_media":11152,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ecommerce"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/posts\/11112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/comments?post=11112"}],"version-history":[{"count":37,"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/posts\/11112\/revisions"}],"predecessor-version":[{"id":11210,"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/posts\/11112\/revisions\/11210"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/media\/11152"}],"wp:attachment":[{"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/media?parent=11112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/categories?post=11112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mconnectmedia.com\/blog\/wp-json\/wp\/v2\/tags?post=11112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}