10 Years
$100K Cash Giveaway
Every purchase gets
you in the draw to WIN!
More Info
View all Products Close Menu Menu
Using LiteMage Cache on my Magento 2.x Store
Posted Thursday June 29th 2017 / Category Advanced

How do I Enable LiteMage Caching for my Magento 2.x Store?

There are a few steps involved in enabling the LiteMage Caching for your Magento Store. These can be broken down into three steps (which are detailed below).

  1. Enable the LiteMage module: You will need to enable the LiteMage Module via your .htaccess file located in the root Magento installation directory.
  2. Install the Magento LiteMage extension: You will need to install the Magento LiteMage extension into your Magento installation.
  3. Configure the Magento LiteMage extension: Once the extension has been installed into your Magento installation you will need to configure specific settings to enable it.

Before continuing on it’s important to note some information;

  • VentraIP Australia is not responsible and cannot provide support for utilising the LiteMage extension inside of your Magento installation. These instructions are provided as is and we suggest you consult your developer before undertaking any of these actions. We cannot provide extended support for third-party applications as they fall outside of the scope of the technical support provided by our team.
  • LiteMage Cache is only available on our new Shared and Reseller hosting. Our legacy Economy, Business and WHM Multi servers do not support LiteMage Cache.
  • You should follow these steps exactly as described, since not following them may make your store not operate properly.
  • Make sure you disable all ‘Full Page Cache’ extensions – since these will interfere with LiteMage and may cause issues. Examples of these extensions include ‘Extendware Full Page Cache’
  • If you are using Magento Compilation (System → Tools → Compilation) then you should disable it first before installing any Extensions.
  • Backup, Backup, Backup – did we mention you should backup your store before you following any of these instructions, and download it to your local computer. Just checking! 🙂
  • IonCube Loader is required for the Magento LiteMage Extension, so make sure you have enabled it. If you’re unsure, login to cPanel and navigate to Select PHP Version and confirm this is enabled.
  • If you’re uncomfortable performing any of these steps, please contact our 24/7 technical support staff and we would be happy to install LiteMage for you.

1. Enable the LiteMage Module

You will need to enable the LiteMage module for Magento store.

You do this by adding the following three lines of code to your root .htaccess (which is usually located under the public_html/ folder. You can place the code at the top of the default .htaccess used by Magento or at the bottom, the choice is yours.

<IfModule Litespeed>
LiteMage on
</IfModule>

Please note: Without this being in your .htaccess the LiteMage system will not function, so it is important to check the .htaccess on each update to Magento to make sure those lines still exist – if not, then add them back in.

 

2. Install the Magento LiteMage extension

You will need to install the LiteMage Extension software for each of your stores that you wish to enable LiteMage on.

  1. Enable SSH for your service (see this guide on how to do this).
  2. Increase your PHP memory_limit to 512M (see this guide on how to do this).
  3. SSH into your shared hosting service and run the following commands:
    Please note: Depending on the size of your store, this may take several minutes, and whilst recompiling, your store may be inaccessible.

    cd public_html
    php bin/magento deploy:mode:set developer
    wget https://github.com/litespeedtech/magento2-LiteSpeed_LiteMage/archive/master.zip
    unzip master.zip
    mkdir -p app/code/Litespeed/Litemage
    mv magento2-LiteSpeed_LiteMage-master/* app/code/Litespeed/Litemage/
    php bin/magento module:enable Litespeed_Litemage
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento deploy:mode:set production
    php bin/magento cache:clean
    php bin/magento cache:flush
  4. You can now log out of SSH, and disable it if you no longer have a need for it.

 

3. Configure the Magento LiteMage extension

  1. Login to the Magento Admin Panel using your login credentials.
  2. Navigate to Stores → Configuration.
  3. In the left side menu, go to Advanced → System → Full Page Cache.
  4. Set the “Caching Application” to “LiteMage Cache within LiteSpeed Server”
  5. Click the ‘Save Config’ button at the top of the screen.
  6. Navigate to System → Cache Management and under Cache Storage Management check all of the boxes.
  7. Click the Submit button to refresh the cache.

 

General troubleshooting

There is a fairly extension troubleshooting guide online at LiteSpeed’s dedicated LiteMage Troubleshooting Guide, plus extensive other online resources that can be found with a simple Google search. We have compiled a list of the most common troubleshooting tips and this will be updated from time-to-time. If you have any suggestions please feel free to leave a comment on this article and we can have these added in.

How do I clear or flush the LiteMage Cache?

Once LiteMage Cache has been enabled, a ‘Flush LiteMage Cache’ button will show up under System → Cache Management.

If you click the buttons ‘Flush Magento Cache’ or ‘Flush Cache Storage’ it will automatically flush the LiteMage Cache.

Can I enable LiteMage cache for just my IP address only for testing purposes?

Yes, you can! Head to Magento Admin → Stores → Configuration → Litemage Cache → LiteMage Configuration → Developer Testing → Enable LiteMage Cache Only for Listed IP’s and then enter your IP address or the IP address you wanted to have the cache enabled for.

Can’t find the answers you're looking for? Check out these other methods of support!