Support » Plugin: Cache Enabler » Gzip not working with Nginx

  • Resolved treecutter


    When we use option “Pre-compress cached pages with Gzip.” on Apache, .gz files are created in the cache folder. However when using Nginx the .gz files are not created, only .html files appear in the cache folder.

    Nginx server block includes this:

    gzip on;
    gzip_http_version 1.1;
    gzip_vary on;
    gzip_comp_level 6;
    gzip_proxied any;
    gzip_types text/plain text/xml image/svg+xml application/rss+xml application/atom+xml application/xml application/xhtml+xml text/css text/javascript application/json application/javascript application/x-javascript application/font-otf application/font-ttf application/font-woff;

    Nginx v.1.21.0
    PHP 8.0 ( tried also with PHP 7.4 )
    Debian Buster
    Gzip version 1.9

    Thanks very much.

    • This topic was modified 7 months ago by treecutter.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter treecutter



    Found the cause, permissions issue.

    Seems the folder wp-content/settings/ needs to be writable by the web server. In this case it was not, therefore settings ( e.g. ‘compress_cache’ => 1, ) were not updated.

    Not sure if some warning message would be useful, as it seems to silently fail in the above scenario.




    I’m happy to hear you were able to find the cause and resolve this issue. While the plugin should be handling the permissions it’s possible it won’t be able to in some environments.

    This means you’re absolutely right, a message should be shown if the wp-content/settings access permissions aren’t what are required by the plugin (like is done for wp-content/cache). I appreciate you letting us know about this. I will have this improved.

    Thread Starter treecutter


    Thank you Corey, terrific support as always for this excellent plugin.

    The plugin works amazingly for us, and am sure Cache Enabler will continue to get even better

    Thanks very much

    • This reply was modified 7 months ago by treecutter.

    You’re very welcome, @treecutter. It’s great to hear that Cache Enabler is working amazing for you. Just so you’re now aware and for the completeness of this thread, checking if the wp-content/settings directory is writable has been added in PR #249 and will be available in version 1.8.0.

    Thread Starter treecutter


    Hello Corey

    That’s great news , thanks for the kind update

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