Many people would like to increase the traffic to their websites and one of the most effective ways to do so is by increasing the loading speed of the website.  Gzip compression it’s the most popular method to load your site faster by reducing more than 70% page size of your blog. There are several methods to enable Gzip compression in WordPress. We’ll describe  two most popular methods.

Enable Gzip using a WordPress plugin

For example we will use one of the most popular plugin (W3 Total Cache) which have a great role in improving your WordPress site performance. To enable Gzip compression using W3 Total Cache, go to Performance > Browser Cache.

Screenshot: Performance -> Browser Cache

Enable Gzip Compression via .htaccess

Even though the plugins are great in extending the functionality of any WordPress website without any coding but it increases the overload on the server which might cause it to crash continuously. To enable Gzip via .htacces please follow the steps below:

1. Login to your root directory on your server using your favorite FTP, then browse to the .htaccess file.

2. In the .htaccess file add the following lines of code:

# compress text, html, javascript, css, 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
AddType x-font/otf .otf
AddType x-font/ttf .ttf
AddType x-font/eot .eot
AddType x-font/woff .woff
AddType image/x-icon .ico
AddType image/png .png

3. Save the .htaccess file and exit it.

Now, you’ve successfully enabled Gzip compression  and your visitor will enjoy your content with a blazing fast speed.