Support » Fixing WordPress » WP Super Cache super caching index.php

  • Hi all,

    I’m just learning about the wonders of WP Super Cache and for the most part it’s working great, but when I enable Super Cache (ON mode) it caches the index page which and the front page of the blog doesn’t refresh. I have index.php in the rejected URI field, but it’s still doing it.

    Does anyone know how to solve this?

Viewing 15 replies - 1 through 15 (of 21 total)
  • There’s something strange going on there.
    How do you normally post to your blog? Through the dashboard Write page? an Offline Writer like Ecto or WLW?
    Do you use future posting?
    Is your WordPress installed in the same directory you’re serving the site from?

    I post on my blog several times a day, but none of the posts were showing up when I had WP Super Cache in “On mode”. I use an offline writer, Windows Live Writer to write my posts. I haven’t tried using future posting.

    WordPress is installed in /public_html/wordpress

    adventmidi – do you access your blog at http://example.com/wordpress/ or http://example.com/ ?

    It’s caching my index-page too. I’ve added index.php and home.php (that’s the template file I’m using for my index-page) to the rejected files but it’s still caching them..
    Seeing I have a random image-header and a RSS-feed on that page it’s kinda annoying (url is http://www.illutic.nl btw, the site is in Dutch).

    doncha – I’m accessing my blog at http://www.example.com, but wordpress is at http://example.com/wordpress.

    dear doncha,
    thanks for the plugin.
    it is working fine for me
    but after moving my account to dedicated it’s caching my index.php,
    and some other dynamic pages like gallery.php,
    my domain is example.com,, and wordpress installed in example.com/english

    my .htaccess file in example.com/english

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*p=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/english/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) /english/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*p=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{DOCUMENT_ROOT}/english/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /english/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    </IfModule>
    # END WPSuperCache
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    and in example.com

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    Options All -Indexes

    can you tell me the solution please

    Grab the development version from http://wordpress.org/extend/plugins/wp-super-cache/download/ as I’ve just checked in a fix that should fix this.

    I’ve downloaded the DEV version and it’s still caching my home.php template page, even after clearing my cache. Any ideas?

    http://www.lamplightmedia.net

    Ok, I’ve tried to hack this plugin myself so that it won’t cache my home page. In wp-cache-phase2.php I’ve edited line 63 to the following:

    if (strstr($uri, '/wp-admin/') || $uri == "http://www.lamplightmedia.net/" || $uri == "http://www.lamplightmedia.net")

    I’m still not having any luck with this. The plugin is still caching my homepage, as I still see the wp-cache notification in the source of the page. Any ideas?

    I don’t quite understand why you’d want it to not cache the front page of the site. Since that’s the one that gets the most hits, that’s the one that you want cached the most.

    Anyway, version 0.8.1 adds an option to “Clear all cache files when a post or page is edited.” That will force it to refresh when you change things.

    I’ve got a rotating image that is using the php rand function to display a different image every time the page is loaded. When it’s cached, the same image is always displayed. That’s why I don’t want the front page to be cached.

    Is that the only reason? Yikes. What a pain.

    Use a javascript to randomize the image displayed instead of PHP code.

    http://www.google.com/search?q=javascript+image+random

    I really didn’t want to do it in javascript, but I guess that’s my only option this point. Oh well…

    I really didn’t want to do it in javascript

    Why not? That would be the best way to do it, really.

    Not necessarily. If a user doesn’t have javascript enabled, then nothing would show up, and Javascript is not standards compliant…

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘WP Super Cache super caching index.php’ is closed to new replies.