How to Enable Gzip Compression on WordPress via .htaccess

Written by
(Last Modified: 5 March 2016)

Wordpress logo
An easy way to enable Gzip compression on your WordPress site via .htaccess on Apache webservers.

Just adding this following code will do it:

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

 

Sumber:
Top 3 Methods to Enable Gzip Compression in WordPress
Enable Gzip Compression

Written by Dhyayi Warapsari
19 October 2014 (Last Modified: 5 March 2016)
Category: , , , ,
Tag: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *