Support » Fixing WordPress » [Plugin: WP Super Cache] Supercache only writing file for index, not subpages

  • I’m testing wp-super-cache and WP 2.8.3 with nginx on my personal server. wp-super-cache is in ‘ON’ mode, but for some reason the only super cache file that is written is index.html (and index.html.gz):

    /blog/wp-content/cache# ls -lR supercache
    total 4
    drwxrwx— 3 www-data www-data 4096 2009-08-11 22:01

    total 4
    drwxrwx— 2 www-data www-data 4096 2009-08-11 22:01 blog/

    total 36
    -rw-r–r– 1 www-data www-data 26543 2009-08-11 22:01 index.html
    -rw-r–r– 1 www-data www-data 8108 2009-08-11 22:01 index.html.gz

    If I visit a page like /blog/category/uncategorized I’d expect a supercache file to be created, but it’s not.

    There are no warnings/errors output from PHP, and I’ve manually placed the two htaccess files (in /blog/.htaccess and /blog/wp-content/cache/.htaccess) to try and trick wp-super-cache into thinking everything is good (although up the top of the wp-super-cache settings page it still says in red ‘Mod rewrite may not be installed!’).

    I don’t have any rewrites in place to actually use the supercache files yet, but I’ll do that once I have the generation working.

    Does anyone know why supercache files beyond the index are not being created?

Viewing 5 replies - 1 through 5 (of 5 total)
  • More info, and some strange behaviour:
    Starting from an empty cache:
    When I hit my frontpage from a cookieless browser, the supercache file is created. When I hit it from a browser I’ve logged into my blog from, the supercache and standard cache files are created. When I hit any other page that should be cached, I get a standard cache file being created.

    I’ve noticed this though in the settings:

    Cache Contents

    WP-Cache (40.45KB)

    * 3 Cached Pages
    * 0 Expired Pages

    WP-Super-Cache (25.92KB)

    * 0 Cached Pages
    * 0 Expired Pages

    So it seems that it’s generating one super cache file, but not finding it again later?

    I’m having a similar issue as you but its backwords. My subpages are cached and the home page is not.

    I use this page to test if it has been gzipped or not.

    checkers, your blog is not on your site’s root, right?


    merid, the above link may also solve your issue. I’m afraid it doesn’t on mine (my homepage is only WP-Cached not WP-SuperCached) but I’m satisfied with it for now.

    I hope this helps.

    Pinoy Thanks! That did the trick for me. Now I just need to get compression(gzipped) to work.

    Got it! The problem was related to my nginx configuration, specifically my pretty-url rewrite.
    I used to do this:
    if (!-e $request_filename) { rewrite ^/blog(.+)$ /blog/index.php?q=$1 last; }
    That triggered this check in WP-Super-Cache:

    Supercache caching disabled. Non empty GET request.
    Supercache disabled: GET or feed detected or disabled by config.

    I changed the rewrite rule to this:
    if (!-e $request_filename) { rewrite ^/blog(.+)$ /blog/index.php last; }

    And everything works fine. My thanks to the new(?) debug feature of wp-super-cache :-).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP Super Cache] Supercache only writing file for index, not subpages’ is closed to new replies.