Home » Blog » WordPress and GZIP Compression

WordPress and GZIP Compression

Jul 10, 2013   //   by David   //   Blog, Coding  //  No Comments

Do you have access to your .htaccess file and want an immediate improvement in your WordPress site’s performance?

Simply add the following code below the # END WordPress to tell your server to send compressed data to the browser when pages are requested. Only textual data is compressed like HTML, PHP, CSS, Javascript, etc. For images you should already be uploading properly sized and compressed files.


# BEGIN GZIP

AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript

# END GZIP

Now, I’m not going to go into the details of FTPing, backing up and editing the file — if you don’t know how to do it, please consider asking someone who does because messing up this file can and will take down your site.

Once you’re done, check to see if it worked.
http://www.whatsmyip.org/http-compression-test/

Leave a comment