PageSpeed Module

PageSpeed Module connects WordPress to the PageSpeed Module, an open-source module for Apache and Nginx created by Google that rewrites pages to reduce latency and traffic. The plugin purges the module’s cache from the WordPress admin and turns on a development mode that bypasses it. If the server has no PageSpeed Module, the plugin does nothing. KAGG Design develops the plugin.

Features

  • Purge Styles: removes the cached copy of the current theme’s style.css after a style change
  • Purge Entire Cache: clears the whole PageSpeed cache of the site, so the module fetches all pages, images and scripts again
  • Development mode: the PageSpeed cache is bypassed, because ?ModPagespeed=off is added to every site URL
  • All on one screen, Settings → PageSpeed
  • Works with Apache and Nginx

Links

Server setup

The plugin purges the cache with PURGE requests, so the server configuration needs two directives.

Server configuration
# Nginx
pagespeed EnableCachePurge on;
pagespeed PurgeMethod PURGE;

# Apache
ModPagespeedEnableCachePurge on
ModPagespeedPurgeMethod PURGE