LiteSpeed & LiteMage for Magento (Firstserv Guide)
All Firstserv shared and business hosting servers run LiteSpeed Web Server, delivering high performance out of the box. On Business hosting plans that support Magento, we also provide LiteMage, a powerful caching solution designed specifically for Magento.
If you’re running a Magento store, we strongly recommend installing LiteMage to significantly improve performance and user experience.
What Does LiteSpeed / LiteMage Do?
In simple terms, caching makes your website much faster.
Without caching:
- Each visitor request triggers the server to:
- Load data from the database
- Generate page content (HTML, images, scripts)
- This takes time and uses server resources
With caching enabled:
- A pre-built version of the page is stored
- Future requests are served instantly from cache
✅ Result:
- Faster page load times
- Reduced server load
- Improved user experience
- Better conversion rates
Handling Dynamic Content (ESI)
Magento sites often include personalised content (e.g. customer details, cart data).
LiteMage solves this with Edge Side Includes (ESI):
- Most of the page is served from cache
- Personalised sections are dynamically inserted
✅ This approach—known as “hole punching”—ensures:
- High performance
- Accurate personalised content
Why Use LiteMage?
- Dramatically improves Magento performance
- Works seamlessly with LiteSpeed Web Server
- Handles both static and dynamic content efficiently
- Requires minimal configuration to see results
Prerequisites
Before installing LiteMage:
- Magento 2 must already be installed
- You must have Administrator access
- SSH access must be enabled on your hosting account
- Basic familiarity with the command line is recommended
- The PHP
execfunction must be enabled temporarily
Installing LiteMage
Step 1: Access Your Server
- Connect via SSH (or cPanel Terminal)
- Navigate to your Magento root directory (e.g.
/public_html)
Step 2: Enable Developer Mode
Step 3: Download LiteMage Module
Step 4: Extract Files
Step 5: Move Files into Magento Directory
Ensure file ownership matches your Magento installation. Adjust using chown if required.
Step 6: Enable the Module
Step 7: Compile Magento
Run one of the following:
(Use setup:di:compile-multi-tenant only if required for older setups.)
Step 8: Return to Production Mode
Step 9: Enable LiteMage in .htaccess
Add the following:
Step 10: Disable PHP exec (Important)
Once installation is complete:
- Disable the
execfunction again via cPanel - Leaving it enabled can create security risks
Activating LiteMage in Magento
- Log in to your Magento Admin panel
- Go to:
Stores → Configuration → Advanced → System - Locate Full Page Cache
- Set:
- Caching Application: LiteMage Cache (LiteSpeed)
- Save settings
Refresh Cache
- Go to System → Cache Management
- Select:
- Configuration
- Page Cache
- Click Refresh
Verifying LiteMage is Working
You can confirm caching is active using your browser’s developer tools:
- Open Developer Tools → Network tab
- Load your website
- Click the first request and check headers
Look for:
- ✅
x-litespeed-cache: hit,litemage→ Cache working - ⚠️
x-litespeed-cache: miss,litemage→ Refresh page (cache not yet built)
Best Practices
- Allow time for cache to build after installation
- Test your store functionality after enabling caching
- Fine-tune LiteMage settings for optimal performance
- Monitor performance improvements using tools like GTmetrix
Summary
LiteMage is a powerful Magento optimisation tool that:
- Speeds up page loading significantly
- Reduces server load
- Supports dynamic content using ESI
- Improves overall store performance
If you need assistance installing or configuring LiteMage on your Firstserv hosting, our support team is always happy to help.
