How to enable Gzip in .Htaccess for WordPress?

In case you have not heard of it in the past, Gzip is a server process that essentially compresses your files on the fly before transmission to the user. It is primarily used to compress text files such as HTML, CSS, and JavaScript with impressive results. Take the 90KB Mootools framework for example, Gzip reduces it to 26KB saving the visitor time and your bandwidth.


If your hosting setup has Gzip enabled I highly recommend that you enable it in your .htaccess file by copying and pasting the above code into your .htaccess. If they don’t have it enabled, simply ask, most of the time they will simply enable it for you. It also comes recommended by Google and Yahoo.