NGIX Compression - Can't get it done.

Hello, I'm trying to get the compression to work for the site. I'm able to compress the text/html, but the text/javascript and text/css I can not get it to compress.

Can you please assist me with this?
Thank you,

  • Sajid

    Hi Chris,
    Hope you are doing good today :slight_smile:

    Do you get any error message while enabling the GZip compression ? Also, do you have any other plugin installed for performance that has similar feature ? If yes then please disable that plugin and then check again.

    Also, after some time, click on re-check status to make to update the status report.

    Take care and have a nice day :slight_smile:

    Best Regards,

  • Chris

    Hello Sajid,

    I just needed to modify the .htaccess and it seemed to work.

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

    # END WordPress
    AddHandler application/x-httpd-php70 .php .php5 .php4 .php3

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/pdf "access plus 1 month"
    ExpiresByType text/x-javascript "access plus 1 month"
    ExpiresByType application/x-shockwave-flash "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresDefault "access plus 8 days"


    ## USE THIS TO GZIP The SIte ##
    <IfModule mod_deflate.c>
    AddType x-font/woff .woff
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/
    AddOutputFilterByType DEFLATE font/opentype font/ttf font/eot font/otf

    ## END GZIP for This Site ##

    Thank you for your assistance!


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.