GZipper WordPress plugin

Recently I set out to check the performance of a couple of WordPress websites that I am responsible for or help out with. I used tools such as GTMetrix. One of the red-flags that showed up was that I was not using any gzip compression on my website. Using compression on your website all webpages and most content on your website get compressed on the server and then decompressed again in the browser. This typically saves a lot of internet traffic. It easily saves 50% to 75% for a regular website. Typically images and movies are already compressed so they are left alone.

Ok then, I just had to enable compression. There is plenty of information on the internet showing you how to do this. Kinsta, for example, has some good instructions on how to enable gzip compression on your webserver. There are also a lot of WordPress plugins that offer to do the nasty stuff for you (i.e. updating .htaccess). Most caching plugins also have this functionality. So I set out to do this. I followed manual instructions, but no, it only enabled compression on static javascript files, css files and the like. So I tried out a bunch of plugins thinking I must be doing something wrong, but with the same results. Next I submitted a support ticket to my hosting provided, TransIP, and they told me that their setup (presumably of the Apache server) did not enable compressing of content that was dynamically generated by PHP. Meaning every single WordPress page would not be compressed. They however also told me that I could use some PHP code to compress the output it generates. I verified that this indeed was the solution and then decided to create a simple but proper WordPress plugin for this to avoid messing with WordPress code or with theme code. I dubbed this plugin Korrel 240 GZipper.

Installation and use

  1. First check whether your webpages are already being compressed. You can do this with this online tool: Check GZIP compression.
  2. If compression works, you are done! If not, please follow the instructions to enable gzip compression on your webserver. You will have to do this as this also takes care of compressing static content. Your website will send a lot of static content to the browser, so you will want to have this!
  3. Check again. If compression works, congratulations, you do not need my plugin. You are done!
  4. Download the plugin (a small zip file).
  5. Now go to your WordPress admin area, go to Plugins and add a new plugin by uploading the zip file.
  6. Activate the plugin.
  7. Check again.
  8. If compression does not work, then this plugin does not solve the issue for you. You can de-active and uninstall the plugin. If it now works, hurrah!, you have just made your website significantly faster.