WordPress.org

Support

Support » Plugins and Hacks » WP Super Cache » [Plugin: WP Super Cache] Can't generate cache files (nginx)

[Plugin: WP Super Cache] Can't generate cache files (nginx)

  • Peter Kirn

    @peterkirn

    I’m attempting to use wp-super-cache with a multisite setup, plus bad behavior and domain forwarding. I’ve enabled legacy caching (as well as trying PHP caching) and the bad behavior and domain forwarding Plugin settings in super-cache admin. But no matter what I do, I seem not to be able to cache files.

    I’m wondering if this is related to my nginx rules. It sounds like under a number of circumstances, nginx will cause supercache to bypass caching. E.g.:
    http://jay.gooby.org/post/nginx-wp-super-cache-not-writing-cache-files-solved

    — though I’m not sure if the advice there is still relevant? I should therefore just modify the nginx rules and leave wp-super-cache alone?

    Appreciate the help!

Viewing 1 replies (of 1 total)
  • Peter Kirn

    @peterkirn

    These are my current rewrite rules – I see some out there for supercache and nginx, but not ones which are multisite-specific.

    if (-f $request_filename) {
                    expires 30d;
                    break;
                    }
    
            # this sends all non-existing file or directory requests to index.php
            rewrite ^.*/files/(.*) /wp-includes/ms-files.php?file=$1;
            if (!-e $request_filename) {
                    rewrite ^.+?(/wp-.*) $1 last;
                    rewrite ^.+?(/.*\.php)$ $1 last;
                    rewrite ^ /index.php last;
                    }
            }
    
            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            #
            location ~ \.php$ {
                include        fastcgi_params;
                fastcgi_pass   unix:/dev/shm/php-fastcgi.sock;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME    /home/noisepages/www/$fastcgi_script_name;
            }
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Super Cache] Can't generate cache files (nginx)’ is closed to new replies.
Skip to toolbar