{"id":758,"date":"2011-07-03T12:28:13","date_gmt":"2011-07-03T11:28:13","guid":{"rendered":"http:\/\/www.penguino.co.uk\/?p=758"},"modified":"2011-07-17T04:47:08","modified_gmt":"2011-07-17T03:47:08","slug":"wordpress-compression-reduce-your-bandwidth-by-using-apache-gzip","status":"publish","type":"post","link":"http:\/\/www.penguino.co.uk\/computing\/wordpress-compression-reduce-your-bandwidth-by-using-apache-gzip","title":{"rendered":"WordPress Compression – reduce bandwidth and loading time using Apache Gzip"},"content":{"rendered":"\n\n\r\n\n\n\n

Like most websites, this site relies on a large amount of images, videos, CSS styles and HTML files. On a monthly <\/span>average, this site you are reading has approximately 1100 visitors, serving 5000+ pages and the data transferred is between 6GB \u2013 8GB. The figure is on the increase and is approaching my hosting’s transfer limit. So I have been looking for ways to reduce it.<\/p>\n

\"\"<\/a><\/p>\n

A common technique for a smaller and faster webpage transmission is by applying HTTP Gzip<\/a>. The basic idea is that a webserver compresses the page contents and send it down to the internet \u201cpipe\u201d. When the page arrived at a browser all contents are decompressed on the fly. The process is transparent, lossless, and is supported by all major browsers so there is no plug-in or extension to install. Website visitors will experience an improved page loading time due to less data being transferred, and will view the content the same as before. Magical \u2013 I am sold!<\/p>\n

You can check whether a website is transmitting with GZIP compression by visiting the site www.ismyblogworking.com<\/a>. A bonus is that you can also discover other parameters such as sitemap XML and robot.txt availability on a site that you wish to examine \u2013 this is a useful tool for blogging webmasters who wish to optimise their sites.<\/p><\/blockquote>\n

Back to the HTTP Gzip – being a wordpress fan myself , the first thing to look for is a compression plug-in<\/a>. There are many of them in WordPress\u2019s repository. I tried the WordPress Gzip Compression<\/a> plug-in and it certainly does the job admirably.<\/p>\n

Being adventurous \u2013 I am looking for a \u201clow-level\u201d solution. My webhosting is a Cpanel account which gives me control of finer aspects of the webserver. While poking around inside Cpanel, an inconspicuous icon that I noticed was the \u201cOptimize Website\u201d under the Software\/Services section.<\/p>\n

\"\"<\/a><\/p>\n

When enabled, this function\u00a0operates at server level. \u00a0All outputs – being HTML, CSS, PNG, JPEG, XML, AVI will be compressed by Apache \u2013 the webserver engine layer. This is below the WordPress\u2019s PHP layer so its performance and scope supersedes WordPress\u2019s plug-ins. Meanwhile this will also work for other webapps such as Joomla, Drupal, Mambo, or in fact anything that is sent via a HTTP request.<\/p>\n

\"\"<\/a><\/p>\n

So to put it to test, I enabled compression for this site since the start of June, and my pages have been sent in compressed form for almost the entire month. The proof is in the pudding and here is the result.<\/p>\n

\"\"<\/a><\/p>\n

\"\"<\/a><\/p>\n

 <\/p>\n

 <\/p>\n\n\n\r\n\n\n\n","protected":false},"excerpt":{"rendered":"

Like most websites, this site relies on a large amount of images, videos, CSS styles and HTML files. On a monthly average, this site you are reading has approximately 1100 visitors, serving 5000+ pages and the data transferred is between 6GB \u2013 8GB. The figure is on the increase and is approaching my hosting’s transfer […]<\/p>\n","protected":false},"author":1,"featured_media":762,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","ngg_post_thumbnail":0},"categories":[3,270],"tags":[282,276,279,243,274,273,281,283,107,280,275],"_links":{"self":[{"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/posts\/758"}],"collection":[{"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/comments?post=758"}],"version-history":[{"count":0,"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/posts\/758\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/media\/762"}],"wp:attachment":[{"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/media?parent=758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/categories?post=758"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.penguino.co.uk\/wp-json\/wp\/v2\/tags?post=758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}