Title: Enabling GZip compression shows error message
Last modified: November 10, 2021

---

# Enabling GZip compression shows error message

 *  Resolved [hanburger](https://wordpress.org/support/users/hanburger/)
 * (@hanburger)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/enabling-gzip-compression-shows-error-message/)
 * When i clicked on enable Gzip, it shows the error message below:
 * We successfully added Gzip compression settings into .htaccess file. However,
   the test file we fetched was not Gzip-compressed. Possible causes include that
   Apache (your webserver) is not configured to allow .htaccess files to take effect,
   or one of Apache modules – mod_filter or mod_deflate – is not active, or the 
   webserver is configured to disallow Gzip compression. You should speak to your
   web hosting support to find how to enable it.
 * I have checked that the server has mod_deflate installed, and zlib.output_compression
   is also set to On in the php.ini.
 * I have checked if the site is compressed over at [http://www.gidnetwork.com/tools/gzip-test.php](http://www.gidnetwork.com/tools/gzip-test.php)
   and it returned a No.
 * There is no cloudflare used on the site at the moment. What other settings could
   it possibly be for me to configure in order to get this working?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fenabling-gzip-compression-shows-error-message%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/enabling-gzip-compression-shows-error-message/#post-15056993)
 * [@hanburger](https://wordpress.org/support/users/hanburger/) You can edit .htaccess
   file and add the following code to enable GZIP on your sevrer.
 *     ```
       # BEGIN WP-Optimize Gzip compression
       <IfModule mod_filter.c>
       	<IfModule mod_deflate.c>
       # Compress HTML, CSS, JavaScript, Text, XML and fonts
       		AddType application/vnd.ms-fontobject .eot
       		AddType font/ttf .ttf
       		AddType font/otf .otf
       		AddType font/x-woff .woff
       		AddType image/svg+xml .svg
   
       		AddOutputFilterByType DEFLATE application/javascript
       		AddOutputFilterByType DEFLATE application/rss+xml
       		AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
       		AddOutputFilterByType DEFLATE application/x-font
       		AddOutputFilterByType DEFLATE application/x-font-opentype
       		AddOutputFilterByType DEFLATE application/x-font-otf
       		AddOutputFilterByType DEFLATE application/x-font-truetype
       		AddOutputFilterByType DEFLATE application/x-font-ttf
       		AddOutputFilterByType DEFLATE application/x-font-woff
       		AddOutputFilterByType DEFLATE application/x-javascript
       		AddOutputFilterByType DEFLATE application/xhtml+xml
       		AddOutputFilterByType DEFLATE application/xml
       		AddOutputFilterByType DEFLATE font/opentype
       		AddOutputFilterByType DEFLATE font/otf
       		AddOutputFilterByType DEFLATE font/ttf
       		AddOutputFilterByType DEFLATE font/woff
       		AddOutputFilterByType DEFLATE image/svg+xml
       		AddOutputFilterByType DEFLATE image/x-icon
       		AddOutputFilterByType DEFLATE text/css
       		AddOutputFilterByType DEFLATE text/html
       		AddOutputFilterByType DEFLATE text/javascript
       		AddOutputFilterByType DEFLATE text/plain
       		AddOutputFilterByType DEFLATE text/xml
   
       # Remove browser bugs (only needed for really old browsers)
       		BrowserMatch ^Mozilla/4 gzip-only-text/html
       		BrowserMatch ^Mozilla/4\.0[678] no-gzip
       		BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
       		<IfModule mod_headers.c>
       			Header append Vary User-Agent
       		</IfModule>
       	</IfModule>
       </IfModule>
       # END WP-Optimize Gzip compression
       ```
   
 *  Thread Starter [hanburger](https://wordpress.org/support/users/hanburger/)
 * (@hanburger)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/enabling-gzip-compression-shows-error-message/#post-15057078)
 * It has already been added to .htaccess file though.
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/enabling-gzip-compression-shows-error-message/#post-15060579)
 * [@hanburger](https://wordpress.org/support/users/hanburger/) Then I suspect Apache
   modules – mod_filter or mod_deflate – is not active on your server, please contact
   your host to active the mod_filter or mod_deflate on your server.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Enabling GZip compression shows error message’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Harshad](https://wordpress.org/support/users/bornforphp/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/enabling-gzip-compression-shows-error-message/#post-15060579)
 * Status: resolved