# litespeed/module-litemage

> LiteMage Full Page Cache for LiteSpeed Web Server

`composer require litespeed/module-litemage`

Canonical URL: https://packagento.com/litespeed/module-litemage

## At a glance

- **Vendor**: litespeed (https://packagento.com/litespeed.md)
- **Latest version**: 2.2.6 — released 2026-05-29
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/litespeed/module-litemage and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require litespeed/module-litemage:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

LiteMage Full Page Cache for LiteSpeed Web Server

## README

### Description

The LiteMage Cache module provides an improved caching solution alternative to the PageCache module and Varnish Cache. The module will replace the Varnish option to the cache selector in the administrator interface for easy switching. 

For most use cases, LiteMage Cache can improve your stores' performance right out of the box. LiteMage Cache also reduces the complexity of your stack; only the LiteMage Extension and LiteSpeed Web Server are required\*. There is no need for an NGINX reverse proxy nor a Varnish Cache instance because the server can handle HTTPS and HTTP/2 requests and cache the pages all in one application.

LiteMage Cache operates by taking information from Magento and instructing the LiteSpeed server on how to cache the page. Once the server knows how to cache it, future requests to the same page will be served directly from the server. Requests will never hit the Magento backend until a change occurs.

\* For clustered setups, LiteSpeed Load Balancer is needed.

### Prerequisites
LiteSpeed Web Server Enterprise Edition with Magento 2 set up and working.

### Installation

The following steps assume that the Prerequisites mentioned above are met.

1. Access a terminal as the Magento directory owner (e.g. "user1") and cd to the Magento 2 root directory. If logged in as root, do `su user1` first.
2. Set the store to developer mode:

    ```
    php bin/magento deploy:mode:set developer
    ```
3. Download the zip package file from this repository.
4. Unzip the source package. The unzipped directory should be named magento2-LiteSpeed_LiteMage-master.
5. In the Magento 2 root directory, run the following command to create the needed directories:

    ```
    mkdir -p app/code/Litespeed/Litemage
    ```
6. Move the contents from the GitHub directory to the newly created directory:

    ```
    mv /path/to/magento2-LiteSpeed_LiteMage-master/* app/code/Litespeed/Litemage/
    ```
7. Confirm that the contents' owner is consistent with the other magento store files.
8. Enable LiteMage 2 in magento:

    ```
    php bin/magento module:enable Litespeed_Litemage
    ```
9. Upgrade the Magento setup:

    ```
    php bin/magento setup:upgrade
    ```
10. Recompile code 

    ```
    php bin/magento setup:di:compile
    ```
11. If desired, switch back to production mode. The previous step may need to be repeated after the mode switch.

#### Enable LiteMage after installation:

1. In the Magento 2 root directory's .htaccess file, add the following lines:

    ```
    <IfModule LiteSpeed>
    LiteMage on
    </IfModule>
    ```
2. Log into the Magento admin page.
3. In Store -> Configuration -> Advanced -> System, make sure LiteMage is enabled and the Full Page Cache setting has LiteMage selected.
4. In System -> Cache Management, refresh configurations and page cache.
5. Visit and refresh a page that should be cache enabled. Look for the LiteMage related response headers.

   Example:
    ```
    X-LiteSpeed-Cache: litemage,hit
    ```

### Configuration

No further changes to your Magento 2 configurations should be necessary as LiteMage honors the same cacheable settings as varnish in the layout xml files.

## Recent Versions

| Version | Released |
|---|---|
| 2.2.6 | 2026-05-29 |
| 2.2.5 | 2025-05-14 |
| 2.2.4 | 2024-03-20 |
| 2.2.3 | 2024-02-14 |
| 2.2.2 | 2023-09-28 |
| 2.2.1 | 2023-07-27 |
| 2.2 | 2023-07-19 |
| 2.1.9 | 2022-05-18 |
| 2.1.7 | 2020-08-07 |
| 2.1.6 | 2020-06-18 |

Showing 10 of 26 versions. Full release history on https://packagento.com/litespeed/module-litemage.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| ext-curl | * |
| magento/framework | * |
| magento/module-inventory-sales-api | * |
| magento/module-page-cache | * |
| php | >=7.4.0 |

## Quality

Latest release (2.2.6) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 1481 | 5 errors, 1476 warnings (ruleset: Magento2) — 1386 auto-fixable with phpcbf |
| PHPMD | Warning | 41 | 41 rule violations (MissingImport:8, IfStatementAssignment:8, CyclomaticComplexity:6, NPathComplexity:5, UnusedFormalParameter:5) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 4 | valid; 4 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 34 | 34 | – | – |
| 2.4.8 | – | 35 | 35 | – |
| 2.4.9 | – | – | 35 | 35 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["litespeed/module-litemage"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

litespeed is a Magento 2 vendor on Packagento. See https://packagento.com/litespeed.md for their full catalogue.

