LiteMage Cache For Magento 2 – Ultimate Installation Guide

April 11, 2023 Written By M-Connect Media

Talk to Experts Need expert help? Don’t hesitate to talk.

You can do direct email atinfo@mconnectmedia.com

WE'RE HERE FOR YOU

We would love to hear about your Magento project, challenge, or opportunity. We'll respond within 24 hours!

litemage cache for magento 2 installation

The LiteMage Cache is the world’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.

This LiteMage cache 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.

LiteMage, which is integrated directly into LiteSpeed Web Server control panel, shortens server stack and eliminates overhead. LiteMage, which is built on LSCache and created for Magento 2, can generate both public and private blocks from cache via hole-punching using ESI.

This post will walk you through the whole process of installing LiteMage Cache on Web Hosting or Managed Cloud Server.

Also Read: 6 Effective Ways To Improve Magento Store Page Load Time

What is LiteMage Cache for Magento 2?

LiteMage Cache is a full-page caching extension for Magento 2 that is intended to increase your website’s speed. It is a proprietary extension created by LiteSpeed Technologies, the same company that created LiteSpeed Web Server.

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, LiteMage Cache uses a combination of server-side caching and client-side caching.

One of LiteMage store’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.

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 Magento 2 website development even more.

Overall, LiteMage Cache is a strong caching solution that may assist your Magento 2 website’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.

Features of LiteMage Cache

LiteMage Cache delivers enhanced caching with ESI implementation tailored exclusively for Magento by combining the LiteMage Magento Extension and an updated version of LiteSpeed Cache.

  • Caching might be static or dynamic.
  • Supports multiple stores, currencies, and user groups.
  • A built-in spider is used to refresh the cache.
  • 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.
  • DDoS protection: LiteMage has DDoS protection, which shields websites from regular HTTP assaults.
  • Quick page loads: LiteMage speeds up your pages by retrieving several content blocks with a single request.
  • Native SSL support: Because other Magento cache extensions do not support native SSL, this is one of the most important aspects of LiteMage.
  • Scalability: It can handle 10000’s of connections without error, therefore it never slows down the website.

Also read: Magento 2 Common Issues You Need to Know To Run Your Store Safely

LiteMage Integration Prerequisites for Magento 2

If you are using Magento Enterprise, you must also disable “Page Cache.”

PHP Prerequisites

LiteMage integration requirements for Magento 2:

Magento 2 needs PHP 7.0.2 or later, 5.6.x, or 5.5.x. Use php -v 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 which php. Then, as a backup, change the current binary name to something else (e.g. mv php php-orig).

Finally, create a symbolic link or copy the binary from the LSWS directory to the directory provided by the which command. If the which command produces no results, we recommend using /usr/local/bin/ or /usr/bin/.

Using PHP 7 with which returning /usr/bin/php:

mv /usr/bin/php /usr/bin/php-orig

ln -s /usr/local/lsws/lsphp70/bin/php /usr/bin/php

After that, execute php -v. If the steps were followed properly, the version number should match the php version on the server.

Installation of LiteMage for Magento 2

The actions that follow presume that the prerequisites listed above are satisfied. Follow these instructions to install LiteMage on Magento 2:

  • Access SSH into your account
  • Go to the Magento 2 installation directory. For instance, type

cd ~/public_html/magento

  • To activate Magento developer mode, use the following line at the command prompt:

php bin/magento deploy:mode:set developer

  • Type the following command to download the LiteMage plugin files:

wget https://github.com/litespeedtech/magento2-LiteSpeed_LiteMage/archive/master.zip

  • Unzip the source package. The magento2-LiteSpeed LiteMage-master should be the name of unzipped directory.

unzip master.zip

  • In Magento 2 root directory, use the following command to create a directory folder for the LiteMage plugin files:

mkdir -p app/code/Litespeed/Litemage

  • Use the following command to move the unpacked LiteMage plugin files to the newly formed directory:

mv magento2-LiteSpeed_LiteMage-master/* app/code/Litespeed/Litemage/

  • Check that the owner of the contents matches the owner of the other magento store files.
  • Type the following command to enable the LiteMage plugin in Magento 2

php bin/magento module:enable Litespeed_Litemage

  • Type command to make the plugin configuration visible to the Magento 2 Admin panel

php bin/magento setup:upgrade

  • Type the commands to recompile Magento:

If you are using Magento 2 and have one Magento store, perform the command

php bin/magento setup:di:compile

  • Use command to return Magento to production mode

php bin/magento deploy:mode:set production

Tips: If you get an error message when running this command, go back to above step and try again.

  • Return to production mode if desired. Following mode transition, the preceding procedure may need to be repeated.

Enable the LiteMage After installation

Follow these steps to enable LiteMage on Magento 2:

  • To enable LiteMage module, add the following code to the Magento root folder’s .htaccess file:

<IfModule LiteSpeed>

LiteMage on

</IfModule>

  • Log into the Magento administration page.
  • Make sure LiteMage is enabled and the Whole Page Cache option has LiteMage selected in Store -> Configuration -> Advanced -> System.
  • Refresh configurations and page cache under System -> Cache Management.
  • Choose Refresh from the list box above the table, then click Submit.

How To Test?

Visit a page with an active cache to test that LiteMage is working properly. Next, by right-clicking the page and selecting “inspect,” you may access the browser’s inspector.

Reload the webpage by clicking the “Network” tab.

Now, choose the item from the list that corresponds to current HTML page (usually the first item ending in .html).

Check the response header for the following LiteMage-related information under “Headers.”

X-LiteSpeed-Cache: hit,litemage

Please reload the page and check again if you see X-LiteSpeed-Cache: miss,litemage.

Also Read: Is Your Magento 2 Admin Panel Slow? Speed Up with These Tactics Now

Conclusion

To summarize, we’ve shown how to include LiteMage into Magento 2. We have finally completed the integration procedure with the help of our Magento support services. If you require any more support, please do not hesitate to contact us.

Frequently Asked Questions

  •  How to manage cache in magento 2?

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.

  • How many types of cache are there in magento 2?

All 14 types of Magento 2 Cache are efficient in enhancing performance and helping your Shop function better with diverse usages.

  • How to enable full page cache magento 2?

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.

Need Magento expert help?

We provide result-driven solutions to expand the competency level and productivity.

Instant Help CenterAvailable!

Monday to FridayResponse promised within 24 hours!

Call Us

+1 319 804-8627

benefits of using responsive magento 2 theme design
magento open source vs adobe commerce

Load Comments

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

5 4 3 2 1

  • Worried for deadlines? Our Magento Experts are effortlessly Working from Home.
  • Check out our Magento Developer Hiring Packages for Agency as well as individuals.
View Packages

Talk to Experts Need expert help? Don’t hesitate to talk.

You can do direct email atinfo@mconnectmedia.com

WE'RE HERE FOR YOU

We would love to hear about your Magento project, challenge, or opportunity. We'll respond within 24 hours!

Please fill this form, Mr.Yogesh will reply by email asap.


Please fill this form, Mr.Darshit will reply by email asap.


Please fill this form, Mr.Jayesh will reply by email asap.


Please fill this form, Mr.Jiten will reply by email asap.