Gzip not working properly
-
Hi – trying to enable gzip unsuccessfully in the plugin. Host says “Both gzip and mod_deflate would be enabled server side” and lines added to .htaccess but still not working.
Plugin suggests opening a support ticket with you so here it is. Any other suggestions as to how to get it to work?
-
Thanks. I see that it is not working. Could you please also share the content of your .htaccess file.
Best regards,
Anton# 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
# BEGIN WP-HUMMINGBIRD-GZIP<IfModule mod_deflate.c>
<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-GZIPCan you please try and remove the WP-HUMMINGBIRD-GZIP section and replace it with
<IfModule mod_deflate.c> <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> 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>
Hi – I have done that and hit the ‘Recheck Status’ button but getting the same error message unfortunately.
I would recommend you check if you .htaccess rules are being applied. The easiest method would be this one:
The simple solution to verify and check if the .htacess configuration file is even touched and parsed is forcing an error. More precisely a 500 Internal Server Error. In order to do that you simple add something to the first line of the .htaccess file that doesn’t make any sense. This could be a single letter or number, a word, basically anything that is not a directive. If you get the 500 Internal Server Error you know that the file has been read because that line triggered the error. If you don’t get an error your server setup is wrong because your .htaccess has not even been touched.
If you get an error, please contact me via this form:
https://premium.wpmudev.org/contact/#i-have-a-different-questionUse this subject, so the email is assigned to me:
Subject: “Attn: Anton”
And put a link to this thread for referencegzip is inactive for HTML
I am on a shared server with siteground hosting so they cant put the generated code on the server confthey said all is enabled on server side
deflate” module enabled
and .htaccess or nginx.conf compression rules are appliedCan you please share a link to your website?
Thanks for using our plugin. As there’s no reply for a long time here, I’m marking this thread as resolved. Feel free to comment back here though, if more assistance is needed and we can re-open it for you! ??
Warm regards,
Dimitris
- The topic ‘Gzip not working properly’ is closed to new replies.