This is a short article mostly optimized for use with WordPress.
First, very simply insert this into your virtual host config file (probably in /etc/httpd/conf.d or in /etc/httpd/conf/httpd.conf if you’re using the basic Apache setup config file for the host):
#Let's set to gzip all apache's output SetOutputFilter DEFLATE #let's exclude the following file types SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|iso|tar|bz2|sit|rar|png|jpg|gif|jpeg|flv|swf|mp3)$ no-gzip dont-vary #set compression level DeflateCompressionLevel 9 #Setup browser specific compression requirements BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch bMSIE !no-gzip !gzip-only-text/html SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
Other than this, it’s pretty clear.
Make sure you have the LoadModule deflate_module modules/mod_deflate.so uncommented in the /etc/httpd/conf/httpd.conf file!
service httpd restart
and good luck!