WP Super Cache
Can't generate cache files (nginx) (2 posts)

  1. Peter Kirn
    Posted 4 years ago #

    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.:

    -- 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!

  2. Peter Kirn
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic