I was reviewing a client’s website tonight, and I wanted to take a peek at how it was performing speed-wise. Now this site was developed on my own server, and then I migrated the WordPress site to my clients hosting package. So I had the site running in Tip-Top shape and it was very quickly loading on my server package, but it did not seem to be performing as well on my clients server. So I started to investigate, and I noticed that the site was not being properly compressed by my clients host.

The tool I used to determine that the clients hosting was not configured the same as mine, was a site called http://checkgzipcompression.com. By utilizing this site, you will instantly find out whether your site is gzip compressed or not. When I moved the site from my host to his hosts they did not have the proper compression module enabled. Now, I will try not to get too technical here, but basically the site was not performing as fast as it was on my hosting package.

One thing that you can do to very quickly speed up your website is to enable gzip. This process can be a very simple one and can cause dramatic increases in your site’s speed. In the case of my client, the website was 79.5% lighter, which means the page has to load less than a quarter the amount of data per page that it had to without the simple gzip enabled! That is huge!

So, here are the steps you need to test your website!

Step 1: Visit http://checkgzipcompression.com

Step 2: Enter your website url and hit enter to start the test

Step 3: Now you will quickly see whether or not GZIP is enabled. If it says you are blessed, GZIP is enabled! Then your site should be loading pretty quickly. If it gives a sad face, and says your compression is not enabled, then you too should have that same sad face. LOL

Step 4: Visit the root folder of your website on your hosting package and find the .htaccess file. (you may need to enable “show hidden files” checkbox in your file manager. You also may need to create one if there isn’t one already.

Step5: Download a copy of your original .htaccess file for a backup, or simply back it up on your server.

Step6: Paste the below code into your .htaccess file and click save

Step7: Re-test your site and smile knowing that your site is probably loading in a fraction of the time it was 10  minutes ago 🙂

Make sure you BACKUP your HTACCESS file! If you don’t you can break your website and may need assistance repairing it!

Google loves to provide fast sites with great content to search traffic. So every improvement you can make is worthwhile if your sites traffic is important to you. There are several other tools I use for this same purpose with different applications. Maybe I will do another post discussing these other options!

Please note, the below htaccess code also adds expires to files, which lets browsers know to not load them new every time a person visits your site. This speeds up the site alot as well. Any questions or comments, please use the form below to get in touch!



<IfModule mod_headers.c>
<FilesMatch “.(ico|gif|jpg|jpeg|png|flv|pdf)$”>
Header set Cache-Control “max-age=29030400”
<FilesMatch “.(js|css|swf)$”>
Header set Cache-Control “max-age=604800”
# 24 HOURS
<FilesMatch “.(html|htm|txt|php)$”>
Header set Cache-Control “max-age=86400”

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 1 week”

## Begin GZip Compression ##
# compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# remove browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

## End GZip Compression ##