Support » Plugin: W3 Total Cache » Minifier doesn't work with Nginx (W3 cache – Version

  • Resolved houmie


    Hi, After the latest update to version, it seems minifier doesn’t work at all.

    I get the famous message:

    It appears Minify URL rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration.

    I can see it has www-data privileges to update this file:

    # BEGIN W3TC Minify core
    rewrite ^/wp-content/cache/minify.*/w3tc_rewrite_test$ /wp-content/plugins/w3-total-cache/pub/minify.php?w3tc_rewrite_test=1 last;
    rewrite ^/wp-content/cache/minify/(.+\.(css|js))$ /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1 last;
    # END W3TC Minify core

    And in the main /etc/nginx/sites-available/default
    the one above is included:
    include /var/www/mysite/htdocs/nginx.conf;

    So what could be wrong?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Frederick Townes


    Did you reload, restart nginx after saving settings? This is required after saving settings when you use nginx since the nginx.conf file is not automatically loaded by nginx when it changes.

    You are right. Restarting it has solved it.

    So you are saying every time I enable/disable Minifier option, I have to restart nginx?

    Thank you,

    Plugin Author Frederick Townes


    Yes, nginx requires patching to “hot reload” changes to configurations the way that Apache can do with .htaccess.

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Minifier doesn't work with Nginx (W3 cache – Version’ is closed to new replies.