Server Compatibility
xSpeed Cache runs on standard PHP hosting and works with Apache, nginx, LiteSpeed, and IIS. What it can configure for you depends on which server you use. This page explains what auto-configures and what needs a manual snippet.
What this does
Some xSpeed Cache features change the way your web server handles requests, for example serving cached pages straight from disk or compressing responses with GZIP. On servers that read a config file from your site folder, xSpeed Cache can write those rules for you. On servers that do not, xSpeed Cache gives you a snippet to paste into your server config instead.
xSpeed Cache detects your server type from the server signature. When it cannot detect the type during a command-line or cron run, it reuses the type it last detected from a normal web request.
Requirements
- WordPress 6.0 or later
- PHP 7.4 or later
- Any standard PHP host
Server-by-server behavior
Apache
Apache reads .htaccess files, so xSpeed Cache configures Apache automatically.
- The static-cache rewrite rules are written to
.htaccessfor you. - GZIP compression is auto-configured.
- The browser-cache rules are written to
.htaccess.
If GZIP is enabled but the live response still is not compressed, xSpeed Cache shows a notice. This usually means AllowOverride is disabled, another plugin is overriding the rules, or mod_deflate is missing. In that case, ask your host to enable GZIP on Apache.
LiteSpeed and OpenLiteSpeed
LiteSpeed reads .htaccess like Apache, so the same automatic configuration applies. xSpeed Cache treats LiteSpeed as an auto-configuring server for both the cache rewrite and GZIP.
When LiteSpeed Cache’s server module is present, xSpeed Cache tells it to stand down and owns the cache itself, so it can tag and count cache hits accurately. Because OpenLiteSpeed cannot tag or log a static hit from .htaccess, LiteSpeed cache hits are routed through the object-cache drop-in, which both tags and counts them.
Note: Brotli compression is part of the core LiteSpeed server and is always available there. On Apache it depends on
mod_brotli, and on nginx it requiresngx_brotli.
nginx
nginx does not read .htaccess, so xSpeed Cache cannot configure it automatically. Instead, xSpeed Cache gives you a server-block snippet to paste into your nginx config once.
- For the static-cache rewrite, copy the snippet from the dashboard into your nginx config and reload nginx.
- For GZIP, the directives are included in the same server-block snippet. Paste it into your nginx vhost (or your container’s nginx config) and reload nginx.
Where the snippet goes depends on your setup:
- Self-managed nginx on the host — paste it into your vhost, typically under
/etc/nginx/sites-enabled/. - nginx inside the same container as PHP — paste it into the container’s nginx config. If a separate host nginx sits in front as a reverse proxy, the snippet does not go there.
Tip: You can also print the nginx browser-cache snippet from the command line with
wp xspeed browser-cache nginx.
IIS
IIS is treated as a manual server, the same as nginx. xSpeed Cache shows you a snippet to add to your server config; it does not write the configuration for you. GZIP is reported as manual on IIS.
Behind a proxy or CDN
xSpeed Cache detects when WordPress is likely running behind a reverse proxy by checking forwarding headers such as X-Forwarded-For and X-Real-IP. It uses this only to adjust the messaging it shows, so container and proxy users see guidance that fits their setup.
If a CDN forwards requests without a local reverse proxy, that can read as a proxy too. This is harmless. The detection only changes wording, never behavior.
For CDN delivery of static files, xSpeed Cache rewrites your asset URLs to your CDN pull-zone. This works with any CDN provider and does not depend on your server type. See CDN Integration for setup.
Auto-configure vs. manual snippet
| Server | Cache rewrite | GZIP |
|---|---|---|
| Apache | Auto (.htaccess) | Auto |
| LiteSpeed / OpenLiteSpeed | Auto (.htaccess) | Auto |
| nginx | Manual snippet | Manual snippet |
| IIS | Manual snippet | Manual snippet |
Checking GZIP
xSpeed Cache confirms GZIP is actually active by sending a single request to your own site’s home URL with an Accept-Encoding: gzip header and reading the Content-Encoding response header. The response body is discarded. This check is throttled to once per hour and goes only to your own server.
Troubleshooting
GZIP shows as enabled but is not active (Apache or LiteSpeed). The .htaccess rules were written but the response is not gzipped. Check that AllowOverride is on, that no other caching plugin is overriding the rules, and that the compression module is installed. Ask your host if you are unsure.
The nginx snippet does not seem to work. Confirm you pasted it into the correct config file for your topology (host vhost vs. container nginx) and that you reloaded nginx afterward.
Running another page-cache plugin. Run only one page-cache plugin at a time. On LiteSpeed, xSpeed Cache steps back from LiteSpeed Cache’s server module automatically; other caching plugins should be turned off.
Related
- WP-CLI Commands
- Debug Mode and Logs
- Configure Browser Cache
- GZIP Compression
- CDN Integration
- Object Cache