Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #724534

    PierreMeul
    Participant

    HI, folowing your recommendations on performance I want to add GZIP compression but I am not sure what I did is right in the file so here it is:

    # Use PHP5.4 as default
    AddHandler application/x-httpd-php54 .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>

    <IfModule mod_deflate.c>

    # Force compression for mangled headers.
    # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
    <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>

    # Compress all output labeled with one of the following MIME-types
    # (for Apache versions below 2.3.7, you don’t need to enable mod_filter
    # and can remove the <IfModule mod_filter.c> and </IfModule> lines
    # as AddOutputFilterByType is still in the core directives).
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE application/atom+xml \
    application/javascript \
    application/json \
    application/ld+json \
    application/rss+xml \
    application/vnd.ms-fontobject \
    application/x-font-ttf \
    application/x-web-app-manifest+json \
    application/xhtml+xml \
    application/xml \
    font/opentype \
    image/svg+xml \
    image/x-icon \
    text/css \
    text/html \
    text/plain \
    text/x-component \
    text/xml
    </IfModule>

    </IfModule>
    # END WordPress

    Can you tell me if I have well placed the additional code as I still see remarks about adding GZIP from the test I am doing with google developer tools in Chrome. See snapshot attached.

    #724851

    Christian
    Moderator

    Hey there,

    We’re sorry but we do not have support for server setup. Our performance article serves only as a guide. If you’re not sure, it is best to seek assistance from a WordPress developer.

    Thank you for understanding.

    #725160

    PierreMeul
    Participant

    OK. Thank you.

    #725164

    Christopher
    Moderator

    You’re welcome.

    #725172

    PierreMeul
    Participant

    I found this link to allow testing of GZIP and it seems ok for my site.
    https://varvy.com/tools/gzip/

    Something you may re-use if somebody else ask you the same 😉

    #725174

    Christopher
    Moderator

    Thanks for sharing the link.