• Resolved michaelpark

    (@michaelpark)


    Hello;

    Like many others here, I’ve tried this without success.

    I installed it just fine, but it wasn’t caching at all. I think the problem was that the “supercache” didn’t get created, and the “cache” directory was locked afterwards.

    Any idea?

Viewing 10 replies - 1 through 10 (of 10 total)
  • What’s the value of $super_cache_enabled in wp-content/wp-cache-config.php ?

    Thread Starter michaelpark

    (@michaelpark)

    It’s set to true.

    $cache_compression = 1; //Added by WP-Cache Manager
    $cache_enabled = true; //Added by WP-Cache Manager
    $super_cache_enabled = true; //Added by WP-Cache Manager
    $cache_max_time = 3600; //in seconds
    //$use_flock = true; // Set it true or false if you know what to use
    $super_cache_max_time = 21600; // in seconds
    $cache_path = ABSPATH . 'wp-content/cache/';

    It’s still not caching even though the “cache” directory is set to 777.

    And here’s my .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{HTTP_COOKIE} !^.*comment_author_.*$
    RewriteCond %{HTTP_COOKIE} !^.*wordpressuser.*$
    RewriteCond %{HTTP_COOKIE} !^.*wp-postpass_.*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{HTTP_COOKIE} !^.*comment_author_.*$
    RewriteCond %{HTTP_COOKIE} !^.*wordpressuser.*$
    RewriteCond %{HTTP_COOKIE} !^.*wp-postpass_.*$
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    </IfModule>
    # END WordPress

    But the “supercache” directory is empty.

    What are the last 5 lines of your wp-config.php ?

    Is WP_CACHE set?

    Thread Starter michaelpark

    (@michaelpark)

    Yes, it is.

    define('WP_CACHE', true);
    define ('WPLANG', '');
    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');

    Stranger and stranger. The only suggestion I have is look through the code yourself. Look at the “wp_cache_ob_callback” function in wp-cache-phase2.php and figure out where it goes wrong by debugging with error_log()

    Thread Starter michaelpark

    (@michaelpark)

    Where does “$supercachedir” get set first? I don’t see it in the config.

    And where do I put “error_log” function?

    Thanks.

    What eventually worked Michael? I’m running into the same issue. I looked at everything in the readme.

    Hey all.
    I had the same exact problem : no supercache directory created (and therefore, no caching at all), whereas everything else seamt to be ok.

    After many hours struggling, i finally found out, thanks to a french blogger who gives a hint on his blog.

    The trick is to :
    – create manually wp-content/cache/ and wp-content/cache/supercache and give them chmod 777
    – install the plugin, update the .htaccess
    – AND THEN, MAGIC TRICK : change the defaut value of
    $sem_id in wordpress/wp-content/wp-cache-config.php (around line 48)
    Put any 4 digits you want (actually i think any value might be ok, didn’t tested).

    I think creating manually /cache/ and /cache/supercache might even not to be necessary, i think only modifying $sem_id does the job.

    I’ve spent many hours browsing the internet for the answer to this specific yet common issue (many people seem to have the same issue) : the only (effective) answer i found is this one.

    Credit goes to Antoine for finding a solution and sharing.

    Peace all.

    Matisme33 – greetings!

    I tried your steps (THANK you for sharing!) but, alas, no dice. ??

    I have a supercache directory, it’s 777 perms, the .htaccess files are all in place, everything’s looking good, I changed $sem_id, the whole deal, but nothing is landing in the cache.

    Hmm …

    Progress! WP_CACHE was in the wrong place in wp-config.php (meaning it was the last thing in the file). I moved it up above the final include and now we’ve got caching!

    Now for a reality check to make sure all’s well.

    I see most of the files end up in the cache and cache/meta directories but not under supercache. For instance:

    meta/wp-cache-0b70cbdeb2cdcf07215ef5b4dc720562.meta
    wp-cache-63d9a2d4a3b7de539ca16fea74e80d3e.html

    For supercache I’ll always see this (my site’s blog is under the blog directory):

    supercache/www.mysite.com/blog/post-slug

    That is, a directory but no file. On occasion I’ll see a few index.html files though:

    supercache/www.mysite.com/blog/post-slug/index.html
    supercache/www.mysite.com/blog/2008/04/index.html

    Is this normal – the occasional files in supercache?

    If so, we’re all set!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘No “SuperCache” Directory’ is closed to new replies.