Use File Compression Methods to Improve Performance of Your WordPress Blog
An excellent way to improve performance while also saving bandwidth is to compress your web pages and other site content. Compression does exactly what you would expect: files and content are compressed by the server in order to reduce their overall size. Once the content is received by the browser, it is immediately uncompressed and displayed properly. This results in faster loading times and reduced bandwidth usage.

While a complete excursion into the realms of file compression is well beyond the scope of this post, here are a few ideas to get you started in the right direction:
• File compression via Apache’s gzip module - for servers running older versions of Apache, an easy and effective way to compress your content is to enable mod_gzip via your server configuration or root .htaccess file.
• File compression via Apache’s deflate module - for servers running newer versions of Apache, an easy and effective way to compress your content is to enable mod_deflate via your server configuration or root .htaccess file.
• File compression via PHP - It is also possible to compress your files using PHP’s output buffer. This method usually involves adding a small snippet of code to the beginning of your theme’s header.php file.
• Manual file compression - For JavaScript, CSS, and other static files, it is also possible to implement compression manually. This typically requires gzipping the files in question and then delivering them via targeting script to supportive browsers.
• Minifying CSS and JavaScript files - Apart from compressing the actual file, it is also possible to compress the contents of your CSS and JavaScript files. This process is called “minifying” and usually involves removing as much white-space as possible. For JavaScript, there are also additional techniques that further reduce the size of the file.
There are also some great online services for compressing CSS and JavaScript file content, including these great sites:
• YUI Compressor – http://developer.yahoo.com/yui/compressor/
• Dean Edwards Packer - http://dean.edwards.name/packer/
• JavaScript Compressor – http://javascriptcompressor.com/
• Another JavaScript Compressor - http://www.xmlforasp.net/JSCompressor.aspx
• Styleneat.com - http://styleneat.com/
• JSMin - http://crockford.com/javascript/jsmin
While there are many different ways to take advantage of file compression, your implementation will depend on the tools and resources available to your server. If possible, enable mod_gzip or mod_deflate and forget about it. Otherwise, if these modules are not available to you, there are many other solutions available.




