Gzip is not working properly
-
Hi Anton, I get the following message:
Gzip is not working properly:
– Your server may not have the “deflate” module enabled (mod_deflate for Apache, ngx_http_gzip_module for NGINX).
– Contact your host. If deflate is enabled, ask why all .htaccess or nginx.conf compression rules are not being applied.I did contact my host, they say they enabled the correct module (over 48 hours ago).
But the error still remains.
Can you please help? It is quite important to optimize my site!
Thanks
AlexThe page I need help with: [log in to see the link]
-
* I sent this error message to the host support and they said that:
“Verify that you have actually enabled the activation lines on your .htaccess file.
If possible, contact the developers of the plugin to see if you are missing a particular activation line in this .htaccess file.”I don’t know how to check if I ‘have actually enabled the activation lines on your .htaccess file”. How can I concretely do that?
Cheers
ok, Anton or Predag, I followed your instruction “you can go to Hummingbird; GZIP Compression panel, select your server type and switch to Manual tab where you will see instructions on how apply the rules.” I am running Apache.
However, putting the code in .htaccess (I put it at the very top of the file) did not resolve the problem š
What is the next thing I shoudl do? my host confirms again that the GZIP is activated on my websites.After you add the necessary code to the .htaccess file, you need to click “re-check status” button on the Gzip Compression page. Also, are all the file types inactive or only HTML?
Best regards,
AntonHi,
I have exact the same problem.
“Gzip is not working properly:
– Your server may not have the “deflate” module enabled (mod_deflate for Apache, ngx_http_gzip_module for NGINX).”– mod_deflate is enabled and loaded (terminal output).
– Apache restarted
– Checked .htaccess and the generated code is inside
– Re-Check Hummingbird GZIP
Still saying that it i snot working properly.Regarding the file types:
– HTML active
– JavaScript inactive
– CSS inactive.This is from my deflate.conf file
<IfModule mod_deflate.c> <IfModule mod_filter.c> # these are known to be safe with MSIE 6 AddOutputFilterByType DEFLATE text/html text/plain text/xml # everything else may cause problems with MSIE 6 AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/xml </IfModule> </IfModule>What can you suggest?
Thanks.
JS and CSS are static files. Probably you have Nginx that serves static assets, and you need to also apply the Nginx rules.
Best regards,
Antondear Anton, can you please explain how we need to apply those rules?
Thanks in advance
AlexandraIt depends on what control panel you have. For example, for Plesk you can do it in Apache & nginx Settings for your domain via the Additional nginx directives field. I believe cPanel has something similar.
If you are a server administrator, you can apply the rules directly to the nginx.conf file.
Best regards,
AntonHi Anton,
I am no server admin, I am simply making my website in WordPress (.org) Dashboard,
and I have no idea where to find the Additional nginx directives field. I also don’t use cPanel. Can you please let me know in my case where I can make the update?
I don’t understand why it is so complicated and time-consuming to use the functionalities of Hummingbird … šHi @montenegroecoadventuresorg,
It’s not hard, it’s just that not all features can be auto configured on every host.
Please try to add this to your .htaccess file:
php_flag zlib.output_compression onAfter that click on ‘re-check status’ in Gzip Compression module in Hummingbird.
Best regards,
AntonHello @montenegroecoadventuresorg
Iām marking this topic as resolved due to recent inactivity. Feel free to post back any update and we can re-open it and carry on troubleshooting! š
Thank you,
DimitrisDear Dimitris,
Sorry for my slow response.
1/ I would like you to tell me where I need to put the line:
php_flag zlib.output_compression onI tried to put it at the end of my htaccess file between:
# BEGIN WP-HUMMINGBIRD-GZIP
and
# END WP-HUMMINGBIRD-GZIP
but got an error 500 on my site!Hummungbird still tells me that JavaScript and CSS are not active, and I checked again with my hosting provider, he says 100% sure that the server allows GZIP compression.
2/ I am sending you my entire htaccess, because it seems Hummingbird has been adding a LOT of things in there, and some seems double even.
Thanks for your clarifications!
Alexandra
———————<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding “gzip,deflate” env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE “application/atom+xml” \
“application/javascript” \
“application/json” \
“application/ld+json” \
“application/manifest+json” \
“application/rdf+xml” \
“application/rss+xml” \
“application/schema+json” \
“application/vnd.geo+json” \
“application/vnd.ms-fontobject” \
“application/x-font-ttf” \
“application/x-font-opentype” \
“application/x-font-truetype” \
“application/x-javascript” \
“application/x-web-app-manifest+json” \
“application/xhtml+xml” \
“application/xml” \
“font/eot” \
“font/opentype” \
“font/otf” \
“image/bmp” \
“image/svg+xml” \
“image/vnd.microsoft.icon” \
“image/x-icon” \
“text/cache-manifest” \
“text/css” \
“text/html” \
“text/javascript” \
“text/plain” \
“text/vcard” \
“text/vnd.rim.location.xloc” \
“text/vtt” \
“text/x-component” \
“text/x-cross-domain-policy” \
“text/xml”</IfModule>
<IfModule mod_mime.c>
AddEncoding gzip svgz
</IfModule>
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/cache-manifest
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/vcard
AddOutputFilterByType DEFLATE text/vnd.rim.location.xloc
AddOutputFilterByType DEFLATE text/vtt
AddOutputFilterByType DEFLATE text/x-component
AddOutputFilterByType DEFLATE text/x-cross-domain-policy
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/ld+json
AddOutputFilterByType DEFLATE application/atom+xml
AddOutputFilterByType DEFLATE application/manifest+json
AddOutputFilterByType DEFLATE application/rdf+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/schema+json
AddOutputFilterByType DEFLATE application/vnd.geo+json
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-web-app-manifest+json
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE font/eot
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE image/bmp
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/vnd.microsoft.icon
AddOutputFilterByType DEFLATE image/x-icon
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A2419200
ExpiresByType text/x-component A2419200
ExpiresByType application/x-javascript A2419200
ExpiresByType application/javascript A2419200
ExpiresByType text/javascript A2419200
ExpiresByType text/x-js A2419200
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType image/svg+xml A3600
ExpiresByType text/plain A3600
ExpiresByType text/xsd A3600
ExpiresByType text/xsl A3600
ExpiresByType text/xml A3600
ExpiresByType video/asf A2419200
ExpiresByType video/avi A2419200
ExpiresByType image/bmp A2419200
ExpiresByType application/java A2419200
ExpiresByType video/divx A2419200
ExpiresByType application/msword A2419200
ExpiresByType application/vnd.ms-fontobject A2419200
ExpiresByType application/x-msdownload A2419200
ExpiresByType image/gif A2419200
ExpiresByType application/x-gzip A2419200
ExpiresByType image/x-icon A2419200
ExpiresByType image/jpeg A2419200
ExpiresByType application/json A2419200
ExpiresByType application/vnd.ms-access A2419200
ExpiresByType audio/midi A2419200
ExpiresByType video/quicktime A2419200
ExpiresByType audio/mpeg A2419200
ExpiresByType video/mp4 A2419200
ExpiresByType video/mpeg A2419200
ExpiresByType application/vnd.ms-project A2419200
ExpiresByType application/x-font-otf A2419200
ExpiresByType application/vnd.ms-opentype A2419200
ExpiresByType application/vnd.oasis.opendocument.database A2419200
ExpiresByType application/vnd.oasis.opendocument.chart A2419200
ExpiresByType application/vnd.oasis.opendocument.formula A2419200
ExpiresByType application/vnd.oasis.opendocument.graphics A2419200
ExpiresByType application/vnd.oasis.opendocument.presentation A2419200
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A2419200
ExpiresByType application/vnd.oasis.opendocument.text A2419200
ExpiresByType audio/ogg A2419200
ExpiresByType application/pdf A2419200
ExpiresByType image/png A2419200
ExpiresByType application/vnd.ms-powerpoint A2419200
ExpiresByType audio/x-realaudio A2419200
ExpiresByType image/svg+xml A2419200
ExpiresByType application/x-shockwave-flash A2419200
ExpiresByType application/x-tar A2419200
ExpiresByType image/tiff A2419200
ExpiresByType application/x-font-ttf A2419200
ExpiresByType application/vnd.ms-opentype A2419200
ExpiresByType audio/wav A2419200
ExpiresByType audio/wma A2419200
ExpiresByType application/vnd.ms-write A2419200
ExpiresByType application/font-woff A2419200
ExpiresByType application/vnd.ms-excel A2419200
ExpiresByType application/zip A2419200
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
AddHandler x-mapp-php5.5 .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
# Wordfence WAF
<Files “.user.ini”>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</Files>
# END Wordfence WAF
# BEGIN WP-HUMMINGBIRD-GZIP# END WP-HUMMINGBIRD-GZIP
While on my other site, on the GZIP compression page of Hummingbird, all 3 File types are inactive.
and I even get the following error:
Gzip is not working properly:
– Your server may not have the “deflate” module enabled (mod_deflate for Apache, ngx_http_gzip_module for NGINX).What should I modify?
Here is my .htaccess file, below.
Thanks for your help – cheers Alexandra
————————————–
# BEGIN HTTPS Redirection Plugin
# END HTTPS Redirection Plugin<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/cache-manifest
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/vcard
AddOutputFilterByType DEFLATE text/vnd.rim.location.xloc
AddOutputFilterByType DEFLATE text/vtt
AddOutputFilterByType DEFLATE text/x-component
AddOutputFilterByType DEFLATE text/x-cross-domain-policy
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE image/svg+xml
</IfModule><IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A2419200
ExpiresByType text/x-component A2419200
ExpiresByType application/x-javascript A2419200
ExpiresByType application/javascript A2419200
ExpiresByType text/javascript A2419200
ExpiresByType text/x-js A2419200
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType image/svg+xml A3600
ExpiresByType text/plain A3600
ExpiresByType text/xsd A3600
ExpiresByType text/xsl A3600
ExpiresByType text/xml A3600
ExpiresByType video/asf A2419200
ExpiresByType video/avi A2419200
ExpiresByType image/bmp A2419200
ExpiresByType application/java A2419200
ExpiresByType video/divx A2419200
ExpiresByType application/msword A2419200
ExpiresByType application/vnd.ms-fontobject A2419200
ExpiresByType application/x-msdownload A2419200
ExpiresByType image/gif A2419200
ExpiresByType application/x-gzip A2419200
ExpiresByType image/x-icon A2419200
ExpiresByType image/jpeg A2419200
ExpiresByType application/json A2419200
ExpiresByType application/vnd.ms-access A2419200
ExpiresByType audio/midi A2419200
ExpiresByType video/quicktime A2419200
ExpiresByType audio/mpeg A2419200
ExpiresByType video/mp4 A2419200
ExpiresByType video/mpeg A2419200
ExpiresByType application/vnd.ms-project A2419200
ExpiresByType application/x-font-otf A2419200
ExpiresByType application/vnd.ms-opentype A2419200
ExpiresByType application/vnd.oasis.opendocument.database A2419200
ExpiresByType application/vnd.oasis.opendocument.chart A2419200
ExpiresByType application/vnd.oasis.opendocument.formula A2419200
ExpiresByType application/vnd.oasis.opendocument.graphics A2419200
ExpiresByType application/vnd.oasis.opendocument.presentation A2419200
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A2419200
ExpiresByType application/vnd.oasis.opendocument.text A2419200
ExpiresByType audio/ogg A2419200
ExpiresByType application/pdf A2419200
ExpiresByType image/png A2419200
ExpiresByType application/vnd.ms-powerpoint A2419200
ExpiresByType audio/x-realaudio A2419200
ExpiresByType image/svg+xml A2419200
ExpiresByType application/x-shockwave-flash A2419200
ExpiresByType application/x-tar A2419200
ExpiresByType image/tiff A2419200
ExpiresByType application/x-font-ttf A2419200
ExpiresByType application/vnd.ms-opentype A2419200
ExpiresByType audio/wav A2419200
ExpiresByType audio/wma A2419200
ExpiresByType application/vnd.ms-write A2419200
ExpiresByType application/font-woff A2419200
ExpiresByType application/vnd.ms-excel A2419200
ExpiresByType application/zip A2419200
</IfModule><IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>AddHandler x-mapp-php5.5 .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
# Wordfence WAF
<Files “.user.ini”>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</Files># END Wordfence WAF
# BEGIN WP-HUMMINGBIRD-GZIP
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding “gzip,deflate” env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE “application/atom+xml” \
“application/javascript” \
“application/json” \
“application/ld+json” \
“application/manifest+json” \
“application/rdf+xml” \
“application/rss+xml” \
“application/schema+json” \
“application/vnd.geo+json” \
“application/vnd.ms-fontobject” \
“application/x-font-ttf” \
“application/x-font-opentype” \
“application/x-font-truetype” \
“application/x-javascript” \
“application/x-web-app-manifest+json” \
“application/xhtml+xml” \
“application/xml” \
“font/eot” \
“font/opentype” \
“font/otf” \
“image/bmp” \
“image/svg+xml” \
“image/vnd.microsoft.icon” \
“image/x-icon” \
“text/cache-manifest” \
“text/css” \
“text/html” \
“text/javascript” \
“text/plain” \
“text/vcard” \
“text/vnd.rim.location.xloc” \
“text/vtt” \
“text/x-component” \
“text/x-cross-domain-policy” \
“text/xml”</IfModule>
<IfModule mod_mime.c>
AddEncoding gzip svgz
</IfModule>
</IfModule>
# END WP-HUMMINGBIRD-GZIPHi @montenegroecoadventuresorg,
Could you please save a copy of your .htaccess prior to trying the following. Just to make sure there are no conflicts, try this configuration:
AddHandler x-mapp-php5.5 .php # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ ā [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and fonts 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-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf 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 Header append Vary User-Agent </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType text/css A2419200 ExpiresByType text/x-component A2419200 ExpiresByType application/x-javascript A2419200 ExpiresByType application/javascript A2419200 ExpiresByType text/javascript A2419200 ExpiresByType text/x-js A2419200 ExpiresByType text/html A3600 ExpiresByType text/richtext A3600 ExpiresByType image/svg+xml A3600 ExpiresByType text/plain A3600 ExpiresByType text/xsd A3600 ExpiresByType text/xsl A3600 ExpiresByType text/xml A3600 ExpiresByType video/asf A2419200 ExpiresByType video/avi A2419200 ExpiresByType image/bmp A2419200 ExpiresByType application/java A2419200 ExpiresByType video/divx A2419200 ExpiresByType application/msword A2419200 ExpiresByType application/vnd.ms-fontobject A2419200 ExpiresByType application/x-msdownload A2419200 ExpiresByType image/gif A2419200 ExpiresByType application/x-gzip A2419200 ExpiresByType image/x-icon A2419200 ExpiresByType image/jpeg A2419200 ExpiresByType application/json A2419200 ExpiresByType application/vnd.ms-access A2419200 ExpiresByType audio/midi A2419200 ExpiresByType video/quicktime A2419200 ExpiresByType audio/mpeg A2419200 ExpiresByType video/mp4 A2419200 ExpiresByType video/mpeg A2419200 ExpiresByType application/vnd.ms-project A2419200 ExpiresByType application/x-font-otf A2419200 ExpiresByType application/vnd.ms-opentype A2419200 ExpiresByType application/vnd.oasis.opendocument.database A2419200 ExpiresByType application/vnd.oasis.opendocument.chart A2419200 ExpiresByType application/vnd.oasis.opendocument.formula A2419200 ExpiresByType application/vnd.oasis.opendocument.graphics A2419200 ExpiresByType application/vnd.oasis.opendocument.presentation A2419200 ExpiresByType application/vnd.oasis.opendocument.spreadsheet A2419200 ExpiresByType application/vnd.oasis.opendocument.text A2419200 ExpiresByType audio/ogg A2419200 ExpiresByType application/pdf A2419200 ExpiresByType image/png A2419200 ExpiresByType application/vnd.ms-powerpoint A2419200 ExpiresByType audio/x-realaudio A2419200 ExpiresByType image/svg+xml A2419200 ExpiresByType application/x-shockwave-flash A2419200 ExpiresByType application/x-tar A2419200 ExpiresByType image/tiff A2419200 ExpiresByType application/x-font-ttf A2419200 ExpiresByType application/vnd.ms-opentype A2419200 ExpiresByType audio/wav A2419200 ExpiresByType audio/wma A2419200 ExpiresByType application/vnd.ms-write A2419200 ExpiresByType application/font-woff A2419200 ExpiresByType application/vnd.ms-excel A2419200 ExpiresByType application/zip A2419200 </IfModule>After that, you will need to re-check the status from Hummingbird Gzip module. If this doesn’t help, I would recommend you contact your host support asking why Gzip Compression is not working and how to enable it.
Best regards,
AntonDear Anton,
Thanks for your support and fast reply.
I did not understand HOW you wanted me to add this code (try this configuration >?) did you mean to add it AT THE BEGINNING of the current .htaccess? I did and got an Internal Server Error: The server encountered an internal error or misconfiguration and was unable to complete your request.I sent you TWO /htaccess files for the TWO sites I have problem with. in which one of the two should I ‘try’ this? And also, if I have to add it at the beginning, it make the .htaccess file way too complex with lots of double lines!
Please specify your thoughts.
AlexandraThis is for your last two replies. I posted the complete file, that’s why asked to save your old file prior to replacing it with the provided code.
Best regards,
Anton
The topic ‘Gzip is not working properly’ is closed to new replies.