Turn on the LiteMage Module

The LiteMage module needs to be enabled for each Magento store. Add the code below in the .htaccess file under the root directory of each Magento installation:

 <IfModule Litespeed> 
 LiteMage on 

Magento LiteMage Extension Installation

The Magento LiteMage extension needs to be installed for each Magento installation.

Note: The extension has not yet been published to Magento Connect, and needs to be installed manually.
  1. Log in to the Magento Admin Panel.
  2. Go to System → Configuration → Web. Set “Use SID on Frontend” to “No”.
  3. Go to System → Magento Connect → Magento Connect Manager. (You will be prompted to enter the Admin Panel password again.)
  4. If you are updating LiteMage to a new version, you must uninstall the old version first.
    1. Updating LiteMage will overwrite LiteMage's config.xml file. Before you update, make sure to copy and save your config.xml file if you have made any customizations.
    2. To uninstall the old version of LiteMage, choose “Uninstall” from the drop down menu next to “LiteSpeed_LiteMage”.
  5. Go to “Direct package file upload”. Select the downloaded LiteMage package and upload. Then click “Return to Admin”.
  6. Go to System → Tools → Compilation. If Compilation is enabled, press “Run Compilation Process”.
  7. Go to System → Configuration.
  8. Click on LiteMage Configuration in the side menu. (If it shows a 404 Error, log off and log back in.)

Turn On/Off LiteMage in Magento Configurations

  1. Go to System → Configuration.
  2. In the left side menu, go to LITEMAGE CACHE → LiteMage Configuration.
  3. Under General Settings, set Enable LiteMage Cache to “Yes”.
  4. For initial deployment, we recommend running LiteMage in test mode:
    1. Under Developer Testing, add your IP address to Enable LiteMage Cache Only for Listed IPs. Remove your IP after you are done with testing.
  5. Click “Save Config” button on the top of the screen.
  6. Go to System → Cache Management. Under Cache Storage Management, check the box next to Configuration. Click the “Submit” button to refresh the configuration cache.


  • To Turn off LiteMage, set Enable LiteMage Cache to “No”, then flush configuration cache again.
  • If you encounter a “Your installation of LiteSpeed Web Server does not have LiteMage enabled.” error, make sure that your LSWS has the LiteMage module and that you have enabled LiteMage in your Magento .htaccess file (in the Turn on the LiteMage Module step above).
  • Once LiteMage Cache is enabled, a “Flush LiteMage Cache” button will show up under System → Cache Management. If you click “Flush Magento Cache” or “Flush Cache Storage”, it will automatically flush LiteMage Cache.


The config.xml (app/code/community/Litespeed/Litemage/etc/config.xml) that comes with LiteMage is based on Magento's sample store data. If you have a customized Magento setup, you may need to add additional ESI blocks and events there.

When testing, be sure to use the Enable LiteSpeed Cache Only for Listed IPs (see full explanation in the Configuration Notes section below). This setting specifies certain IPs that will test caching while other IPs are served normally.

Updating: Important Note

Updating LiteMage will overwrite LiteMage's config.xml file. Before you update, make sure to copy and save your config.xml file if you have made any customizations.

Magento LiteMage Extension Configurations

  • LiteMage's default configurations should be suitable for testing.
  • Please read the comments for each configuration if you want to adjust them.
  • Detailed notes on certain settings are also provided in the Notes on Specific Configurations section below.

Notes on Specific Configurations

  • Default Private Cache TTL: Should not be set higher than the Cookie Lifetime setting. The default Cookie Lifetime value is 3600.
  • Enable Cache Warm Up: Because LiteMage is encrypted, the Magento cron.sh must use a PHP with IonCube Loader. Updating the cron.sh PHP_BIN setting to “PHP_BIN=/usr/local/lsws/fcgi-bin/lsphp5” will connect it to LSWS's PHP. (How to set up the Magento cron job: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job )
  • Enable LiteSpeed Cache Only for Listed IPs: This setting is used to allow administrators to test caching from certain IPs on a production server. When you are ready to use cache for all users, leave this setting blank. After updating this setting, flush LiteSpeed's cache (System → Cache Management). This will get rid of the cached copies made during testing (which cannot be served to normal users).
  • Flush LiteSpeed Cache: The Flush LiteSpeed Cache button (under System → Cache Management) flushes all public and private caches. Cache Warm Up (if enabled) will also be started automatically after the cache is flushed.
  • Each Magento installation requires a unique cache storage. You must set up different cache storage paths for each installation. Follow the steps below to do so:
    • Different cache storage paths can be set using the CacheRoot directive in Apache virtual host configurations as follows (This must be put in the virtual host include file. .htaccess cannot be used. You need to contact our support team to get this step done.):
<IfModule Litespeed>
CacheRoot /path/to/vhost/cache/root/
Was this answer helpful? 0 Users Found This Useful (0 Votes)