678-807-9676 hi@yazminmedia.com


With this 1-Hour WordPress tutorial, we will once again be working in the .htaccess file. So get comfortable, we’ll be adding a few lines of code to enable gzip compression in your WordPress install. While this isn’t specific to WordPress, it does help you by allowing you to reduce the number of plugins on your WordPress website by one.


What happens when you enable gzip compression?

When you enable gzip compression, you’re reducing the size of files sent from your server to increase the speed to which they transfer to the browser. In English? This means your website downloads faster because the files used for it are smaller.


How to enable gzip compression

This walk-through is for Apache servers. If your server is IIS, visit the Microsoft TechNet document to enable compression.


Step 1: Check your sites performance

You can’t know how much you’ve improved your site without creating a starting benchmark. I recommend testing with GTMetrix.

I’ll be making changes for this tutorial on a test website. Here is the GTMetrix score, pre-edit:

Step 2: Open your .htaccess file

Add the following code to the bottom of the file:

And that’s it!

Here is the score for my test website, after adding the code to enable gzip compression:


Just look at that improvement! Just a few quick changes in the .htaccess file made the Page Speed grade jump from a D to a B and reduced the page size almost in half. Not to shabby for a mere 15 minutes worth of work… most of which was just logging into the server!

So, did this work for you? What improvements did you see in your Page Speed and YSlow grades?