Problems activating gzip compressio

Hi,

I got this 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)

– Another plugin may be interfering with the configuration

I previously had W3 Total Cache, but I’ve deleted it before installing Hammingbird.

I’ve checked and mod_deflate is active on my VPS.

Can you please help me?

Thanks

Nicola

  • Nithin Ramdas
    • Support Wizard

    Hi Nicola,

    Hope you are doing good today.

    Since I don’t see you mention about performing a plugin conflict test, could you please run a quick plugin/theme conflict test as illustrated in getting support manual (flowchart), and rule out whether any plugin is causing this issue.

    http://wpmudev.com/manuals/using-wpmu-dev/getting-support/

    Could you please check with your host, whether there is any server side caching enabled? if yes, Clearing the cache should help.

    If there isn’t any caching going on, and still you have issues, could you pleases try adding the following line in your php.ini file, you’ll have to create the file if not present, and add place the file in your root directory.

    zlib.output_compression = On

    Please let us know how that goes, so that we could give a closer look. Have a nice day. :slight_smile:

    Kind Regards,

    Nithin

  • Nicola
    • WPMU DEV Initiate

    Hi,

    thank you for the answer.

    I tried to write:

    zlib.output_compression = On

    on php.ini but nothing happens.

    I have APC cache installed, and into this Server I have multiple websites.

    I tried also to insert

    apc.enabled=0

    But nothing changes.

    How can I figure out this problem?

    Thank you

    Nicola

  • Ash
    • Code Norris

    Hello nicola

    When you deactivated W3TC from your site, did you remove W3TC related code from your htaccess and wp-config.php? Also, did you delete related files from wp-content folder?

    Also, when you add this code in your php.ini file:

    zlib.output_compression = On

    You need to restart apache or php after editing.

    And finally, would you please post your current htaccess here?

    Have a good day!

    Cheers

    Ash

  • Nicola
    • WPMU DEV Initiate

    Hi Ash,

    I have restarted apache but nothing hanged.

    Here is my .htaccess:

    # 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-javascript"
    "application/x-web-app-manifest+json"
    "application/xhtml+xml"
    "application/xml"
    "font/eot"
    "font/opentype"
    "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

    # BEGIN WP-HUMMINGBIRD-CACHING
    ^M
    <IfModule mod_expires.c>^M
    ExpiresActive On^M
    ExpiresDefault A0^M
    ^M
    <FilesMatch ".(txt|xml|js)$">^M
    ExpiresDefault A691200^M
    </FilesMatch>^M
    ^M
    <FilesMatch ".(css)$">^M
    ExpiresDefault A691200^M
    </FilesMatch>^M
    ^M
    <FilesMatch ".(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)$">^M
    ExpiresDefault A691200^M
    </FilesMatch>^M
    ^M
    <FilesMatch ".(jpg|jpeg|png|gif|swf|webp)$">^M
    ExpiresDefault A691200^M
    </FilesMatch>^M
    </IfModule>^M
    ^M
    <IfModule !mod_expires.c>^M
    <IfModule mod_headers.c>^M
    ^M
    <FilesMatch ".(txt|xml|js)$">^M
    Header set Cache-Control "max-age=691200"^M
    </FilesMatch>^M
    ^M
    <FilesMatch ".(css)$">^M
    Header set Cache-Control "max-age=691200"^M
    </FilesMatch>^M
    ^M
    <FilesMatch ".(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)$">^M
    Header set Cache-Control "max-age=691200"^M
    </FilesMatch>^M
    ^M
    <FilesMatch ".(jpg|jpeg|png|gif|swf|webp)$">^M
    Header set Cache-Control "max-age=691200"^M
    </FilesMatch>^M
    </IfModule>^M
    </IfModule>
    # END WP-HUMMINGBIRD-CACHING

    Thank you

    Nicola