Save the Internet from WordPress speed abuse.Updated: June 2017
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:
- Check and Enable Gzip Compression (6.2k download)
- Gzip Ninja Speed Compression (157k download)
- WordPress Gzip Compression (2.2k download)
- WP HTTP Compression (64k download)
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/
Or this one: https://checkgzipcompression.com/
Example – Our PagePipe Gzip results using online tests:
- 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.
Gzip is a software application used for file compression and decompression. Gzip is short for GNU zip; as the program was created as a free software replacement for the compression program used in early Unix systems.
Gzip replaces patent-encumbered data compression algorithms.
Most browsers and server platforms (including Apache and Microsoft IIS) support Gzip. It is often used in web applications and software such as PHP to improve speed. Hypertext PreProcessor (PHP) is a server-side HTML embedded scripting language. PHP is not always provided by a hosting server or may be a “paid” option. PHP is something that need to be “switched on” on the server. Check your ISP for how to do this. Or assume it’s on and just test. You can test to see whether PHP is activated with YSLOW or PageSpeed tools. Gzip can compress the HTML code by 50 percent to 70 percent. It does not compress images. Use SmushIt for image optimization or an image processing program like GIMP or Photoshop – or online at pixlr express.
Gzip compression: What’s the speed gain?
Gzip reduces redundancy in the HTML code. All modern servers and browsers can compress and decompress Gzip on-the-fly. It’s not the same as removing “white space.” White space removal eliminates spaces between words and code. That would buy a 10% reduction in the HTML and is meaningful on dialup. White space removal is now called “minification” or “minifying.” Removing white space AND using Gzip simultaneously are almost an insignificant compression gain—about 1%. Not worth the time usually since all “blanks” are redundant and compressed by Gzip anyway. The difference in speed is usually indistinguishable.
There are a number of plugins that claim to invoke Gzip. Many actually break your site (white screen of death from plugin conflicts) or make your site slower. The goal usually is a simple code modification in a file located in your site’s root folder. This is called the “.htaccess” file. You can alter this code with a simple copy-and-paste in a text editor. But even easier than that is using the “Far Future Expiry Header” plugin. We’ve found that is the simplest – and weightless. When we say “weightless,” we mean the plugin doesn’t add any weight to your pages and thus has no “drag” slowing things down. With the plugin, there’s no messing around in C-panels or FTP clients. The plugin is built for caching your site assets for up to 365 days into the future. We recommend doing that. At the bottom of the plugin control panel page is a little radio button that when clicked enables Gzip for your entire site. Easy! And it works.
PagePipe helps you balance performance and mobile branding.
Serious Mobile WordPress Speed Strategy for Business