Update on Gzip Compression

Reading Time: 2 minutes

Gzip compression speeds up text based file transfers. It’s not applied to image files. But it does compress HTML, Javascript, PHP, CSS, and others by 50 to 70 percent. The load time improvement can be noticeable.

T
he option to enable gzip compression was removed in WordPress 2.5 because Apache servers could handle it much more efficiently than PHP. The Gzip function was never put back. It then became necessary to edit the server HTTP access file manually. However, many people don’t have root server access (as in many shared hosting accounts) so that denied them Gzip speed benefits.

Because of the WordPress 2.5 change, Gzip could only be enabled by editing the HTTP access file via FTP or Cpanel. This is not only cumbersome but also dangerous. Making a mistake breaks your WordPress site. We know from experience. It’s not a fun place to be.

Plugins were soon authored to compensate for the loss of functionality in WordPress. We don’t recommend any of these plugins. They are unnecessary. These useless plugins are:

Repeat: We don’t recommend any of the above Gzip plugins. WARNING: Several may actually break your site (white screen of death from plugin conflicts) or make your site slower. We speak from experience again. It depends upon your theme and other plugins.

Many, Gzip plugins run through PHP, which, although fast, is not as fast as running directly from the Apache server using mod_deflate. Running Gzip via PHP uses extra CPU cycles and memory.

Before installing any plugins for Gzip.

Your hosting may automatically enable Gzip. Then no plugin is needed. For example, today GoDaddy’s Linux Web Hosting accounts have mod_deflate enabled by default. Mod_deflate is an apache server module that compresses data using gzip compression before sending it to the user. This compresses all text type files requested from it (HTML, CSS, JS, PHP, etc). Your hosting may do the same. Check your site with this tool: http://ismyblogworking.com/

Example – Our PagePipe Gzip results using this test:

  • Page size (uncompressed): 31,766 bytes
  • Download size (compressed): 6,728 bytes
  • Bandwidth saved by compression: 78.8%

If your host isn’t providing automatic Gzip compression, then use one or both of the following plugins. They’re proven safe methods:

WP Super Cache
Caching plugin for WordPress. We find this plugin doesn’t always help with speed. This plugin has an option to enable gzip compression.
Select: “Compress pages so they’re served more quickly to visitors.”

Far Future Expiration Header
This plugin will add a “far future expiration” date for various file types to improve site performance. This is a best practice advocated by the Yahoo Extreme Performance Team. It keeps files and images cached longer. There is also a radio button to enable Gzip – a nice addition. Set Far Future expiration to 365 days. You’re done.

WP Super Simple Speed
WP Super Simple Speed is lightweight (less than 20kb in size), and has no clutter or unnecessary code or configs. Simple performance optimization without any hassle. Gzip is automatically added to your .htaccess file on your server by this plugin.

For more information, read our article: “50% to 70% code compression. Gzip for code speed”

PagePipe helps you balance performance and mobile branding.

What others think of us:


"Steve Teare bailed us out. Our organization had two outdated sites and lost our volunteer web designer. The site rebuilds entailed a great deal of work to sort out all the outdated content, images, and documents and get to work on our updated goals." visitpalouse.com Washington, USA

by - Mike Milano