How do I enable LiteMage Caching for my Magento 1.X Store?
LiteMage Cache works like Apache mod_cache or Varnish, but is implemented in a more efficient way. LiteMage Cache uses the LiteMage Magento extension and an improved version of LS Cache to deliver superior caching with ESI implementation geared specifically for Magento.
1. Requirements before commencing LiteMage activation 2. How do I Enable LiteMage Caching for my Magento Store? 3. Install the Magento LiteMage extension 4. Configure the Magento LiteMage extension 5. Troubleshooting Requirements before commencing LiteMage activation
1. LiteMage cache can only be used on our Stealth plans
2. This guide is only to be used for Magento 1.X, if you're using Magento 2.X and above please follow this guide
3. 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'
4. If you are using Magento Compilation (System → Tools → Compilation) then you should disable it first before installing any Extensions.
How do I Enable LiteMage Caching for my Magento Store?
Add the following code to the .htaccess file located in the directory serving your Magento instance (eg. public_html) <IfModule Litespeed>
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. Login to your Magento Admin Panel (eg. http://www.yourdomain.com/admin)
2. Navigate to System → Configuration → Web → Session Validation Settings and set 'Use SID on Frontend
' to No.
3. Navigate to System → Magento Connect → Magento Connect Manager.
- You will be prompted for your admin credentials again, so enter them in and continue on.
- If you do not already have one, create a Magento Connect account.
- Visit the Magento Connect LiteMage Cache page, log in, and click the install now button.
- After reading and agreeing to the extension license agreement, click "Get Extension Key" and copy the key.
- Back in the Magento Connect Manager, go to "Install New Extension" and paste the extension key.
- Click "Install" and then "Proceed" after reviewing the extension dependencies.
On certain browsers you may receive an "Exception during cache and session cleaning" error message in the Magento Connect output frame. If this occurs your Magento site will become stuck in maintenance mode and therefore be inaccessible. To fix this simply delete the file “maintenance.flag” from the root folder of your Magento site.
4. Select the 'Return to Admin' button. Logout from the Magento Admin Panel (You need to do this, as otherwise you will get 404 errors when trying to enable the LiteMage Extension).
Configure the Magento LiteMage extension Note: The Magento LiteMage Extension is disabled by default. You can enable or disable the extension easily from inside the Magento Admin Configuration Panel.
1. Login to the Magento Admin Panel using your login credentials.
2. Navigate to System → Configuration.
3. In the left side menu, go to LiteMage Cache → LiteMage Configuration.
4. In 'General Settings
' set Enable LiteMage Cache to Yes.
5. Click the 'Save Config
' button at the top of the screen.
6. Navigate to System → Cache Management and under Cache Storage Management check the box next to Configuration.
7. Click the 'Submit
' button to refresh the cache.
Troubleshooting How to check if a page is served from LiteMage Cache or not
Use your browser's developer tool to check response header. If you see header "X-LiteSpeed-Cache: hit,litemage", that means the page is served by litemage cache. 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. How to temporarily turn off LiteMage for certain URL from browser
Sometimes you may want to check if an issue is caused by LiteMage Cache being enabled but do not want to disable LiteMage Cache for everyone. You can add the following parameter "LITEMAGE_DEBUG=NOCACHE" to the end of the URL and the page will not be served from LiteMage Cache. For example if your URL to a page in your Magento store is http://mymagentostore.com.au/alice-in-wonderland.html you would change it to http://mymagentostore.com.au/alice-in-wonderland.html?LITEMAGE_DEBUG=NOCACHE to view the page not served by LiteMage cache. Can I enable LiteMage cache for just my IP address only for testing purposes?
Yes, and it is highly recommended to do so especially on production servers. To enable this, go to Magento Admin → System → Configuration → LITEMAGE CACHE → LiteMage Configuration → Developer Testing → Enable LiteMage Cache Only for Listed IPs