Upgrading from Open-Source
Step-by-step guide to replacing Google's open-source mod_pagespeed with the maintained 1.1 release. Drop-in compatible — keep your existing config.
Overview
mod_pagespeed 1.1 is a drop-in replacement for Google’s open-source mod_pagespeed. The upgrade takes a few minutes:
- Stop your web server
- Replace the module binary
- Start your web server
That’s it. Your existing configuration, filters, and .htaccess rules continue to work.
Before you start
Check your current version:
curl -I http://localhost/ | grep X-PageSpeed
Back up your current module in case you want to roll back:
# nginx
sudo cp /usr/lib/nginx/modules/ngx_pagespeed_module.so /usr/lib/nginx/modules/ngx_pagespeed_module.so.bak
# Apache
sudo cp /usr/lib/apache2/modules/mod_pagespeed.so /usr/lib/apache2/modules/mod_pagespeed.so.bak
Upgrade steps
nginx
# 1. Stop nginx
sudo systemctl stop nginx
# 2. Replace the module
sudo cp ngx_pagespeed_module.so /usr/lib/nginx/modules/
# 3. Start nginx
sudo systemctl start nginx
# 4. Verify
curl -I http://localhost/ | grep X-PageSpeed
# Should show: X-PageSpeed: 1.1.0
Apache
# 1. Stop Apache
sudo systemctl stop apache2
# 2. Replace the module
sudo cp mod_pagespeed.so /usr/lib/apache2/modules/
# 3. Start Apache
sudo systemctl start apache2
# 4. Verify
curl -I http://localhost/ | grep X-PageSpeed
IIS
- Uninstall the existing IISpeed or mod_pagespeed module from IIS Manager
- Install the mod_pagespeed 1.1 module
- Restart IIS:
iisreset
Cache migration
mod_pagespeed 1.1 uses Cyclone Cache, a new cache backend. On first start after the upgrade:
- The old file cache is ignored (not deleted)
- Cyclone Cache starts fresh with an empty cache
- Resources are re-optimized on first request — expect a brief warm-up period
You can safely delete the old cache directory after confirming the upgrade works:
# Check your config for the cache path, then:
sudo rm -rf /var/cache/mod_pagespeed/ # or wherever your old cache lived
Configuration compatibility
All existing directives are supported. A few notes:
| Directive | Status |
|---|---|
pagespeed on/off | Works as before |
pagespeed RewriteLevel | Works as before |
pagespeed EnableFilters | All 40+ filters available |
pagespeed DisableFilters | Works as before |
pagespeed Domain | Works as before |
pagespeed MapOriginDomain | Works as before |
pagespeed FileCachePath | Accepted — Cyclone Cache uses its own storage |
The FileCachePath directive is still accepted for compatibility but mod_pagespeed 1.1 uses Cyclone Cache for storage. You can remove it from your config if you prefer.
Rolling back
If you need to revert to the open-source version:
# Restore the backup you made earlier
sudo systemctl stop nginx
sudo cp /usr/lib/nginx/modules/ngx_pagespeed_module.so.bak /usr/lib/nginx/modules/ngx_pagespeed_module.so
sudo systemctl start nginx
Getting help
- Documentation: mod_pagespeed 1.1 docs
- Legacy docs: Open-source documentation (1.0)
- Support: Contact us — included with your subscription