• Hi,

    When I run my website through webpagetest.org for example, I get an F for compress transfer. It’s telling me to “Use gzip compression for transferring compressable responses”. I’ve enabled HTTP (gzip) compression in the settings.

    There are a number of files from the parent theme and some plugins where compression seems to fail (CSS and JS).

    Examples:
    FAILED – (118.4 KB, compressed = 19.1 KB – savings of 99.2 KB) – https://example.com/wp-content/themes/bootstrap-basic/css/bootstrap.min.css?x16700
    FAILED – (11.1 KB, compressed = 4.1 KB – savings of 7.0 KB) – https://example.com/wp-includes/js/wp-emoji-release.min.js?ver=4.7.1

    How do I go about making sure these files get compressed as well?

    I can’t delete the parent theme or most the plugins that appear in the list, as they’re pretty essential to the website.

    Thanks

    • This topic was modified 7 years, 10 months ago by touto.
Viewing 2 replies - 1 through 2 (of 2 total)
  • First make sure your server supports gzip, i.e. that mod_deflate (Apache) or ngx_http_gzip_mod (Nginx) are compiled.

    Next, check the .htaccess (Apache) or nginx.conf (Nginx) file in your web root directory to see if the gzip-related directives that W3TC adds are actually present. If not, you may need to change permissions on that file so W3TC can write to it.

    You can also add the directives manually (note this is not specific to W3TC):

    https://varvy.com/pagespeed/enable-compression.html

    You can confirm that gzip is working using one of these tools to test different pages/files on your site:

    https://varvy.com/tools/gzip/
    https://checkgzipcompression.com/

    Thread Starter touto

    (@touto)

    Thanks for the help. I have modified the .htaccess file, and checkgzipcompression.com now tells me gzip compression is enabled. However, when I run the Google page test or webpagetest.org, the same files as before still come up as not compressed. I think it might be an issue with the host 1&1, I will get in touch with them.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to compress specific files? (gzip compression question)’ is closed to new replies.