• Resolved agesofelegance

    (@agesofelegance)


    Hi I’m getting the following on trying to configure gzip

    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.

    If re-checking and restarting does not resolve, please check with your host or open a support ticket with us.

    My host says it’s enabled, and deflate module is enabled into .htaccess as per their support, I’ve also added the manual configuration to the .htaccess doc too, but it’s still saying the above. Any ideas ?

    Thanks, code below

    # 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-CACHING

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A0

    <FilesMatch “\.(txt|xml|js)$”>
    ExpiresDefault A691200
    </FilesMatch>

    <FilesMatch “\.(css)$”>
    ExpiresDefault A691200
    </FilesMatch>

    <FilesMatch “\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$”>
    ExpiresDefault A691200
    </FilesMatch>

    <FilesMatch “\.(jpg|jpeg|png|gif|swf|webp)$”>
    ExpiresDefault A691200
    </FilesMatch>
    </IfModule>

    <IfModule mod_headers.c>
    <FilesMatch “\.(txt|xml|js)$”>
    Header set Cache-Control “max-age=691200”
    </FilesMatch>

    <FilesMatch “\.(css)$”>
    Header set Cache-Control “max-age=691200”
    </FilesMatch>

    <FilesMatch “\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$”>
    Header set Cache-Control “max-age=691200”
    </FilesMatch>

    <FilesMatch “\.(jpg|jpeg|png|gif|swf|webp)$”>
    Header set Cache-Control “max-age=691200”
    </FilesMatch>
    </IfModule>
    # END WP-HUMMINGBIRD-CACHING
    <IfModule mod_deflate.c>
    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
    AddOutputFilter DEFLATE .shtml
    </IfModule>
    <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>

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi @agesofelegance,

    Could you please try changing your .htaccess file, this part:

    <IfModule mod_deflate.c>
    <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>

    to

    <IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
    <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
    Thread Starter agesofelegance

    (@agesofelegance)

    have done and still getting the same issue I’m afraid

    @agesofelegance,

    You have gzip compression working fine for html, but, for some reason, not working properly for css & js files. Could you please try and remove this part:

    <IfModule mod_deflate.c>
    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
    AddOutputFilter DEFLATE .shtml
    </IfModule>

    It’s not from Hummingbird code.

    Thread Starter agesofelegance

    (@agesofelegance)

    no that’s the code my hosting server says is needed to enable the gzip. I’ll try though and see if that works

    Thread Starter agesofelegance

    (@agesofelegance)

    Nope still not working and getting the same response sorry

    It could be that all the static assets are handled by Nginx. Then you will need to add the configuration to nginx.conf file. Could you please ask your host if you have an Nginx+Apache configuration?

    Thread Starter agesofelegance

    (@agesofelegance)

    will do. Their status is that it is working, and a problem with your software. We are with 1and1 btw. With the code copied from them to get gzip working

    @agesofelegance,

    Hummingbird won’t be able to do anything if the gzip module doesn’t work. Like your host said – adding the code above to the .htaccess file should make gzip work, but it doesn’t… This indicates that there is some configuration problem. You can verify this with any external tool or site, for example with https://checkgzipcompression.com and using any static file (css or js) from your site as a test url.

    By the way, are you using 1and1 CDN?

    Since content delivery networks such as 1&1 CDN already offer built-in compression, please do not enable gzip compression if already utilizing a CDN.

    Thread Starter agesofelegance

    (@agesofelegance)

    hi no we aren’t using CDN

    Using the link it’s saying gzip is working, but Hummingbird is still saying there’s an issue

    Hi @agesofelegance,

    Could you please test with the new version?

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    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

    Thread Starter agesofelegance

    (@agesofelegance)

    It wasn’t, I unfortunately had to delete the plugin and use something else

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    So sorry to hear that! ??
    Have you tried with latest release too?
    If not, feel free to give this a try and let us know here, if this is still happening in your end.

    Take care,
    Dimitris

    Same problem here, the gzip only works for html, not for css and js.

    This is my .htaccess config
    # 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-GZIP

    @tokegameart,

    If compression is working only for HTML, that means that you static files are handled by Nginx. Please apply the appropriate rules to the nginx config file.

    Best regards,
    Anton

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Gzip not working’ is closed to new replies.