mpatzekov
By:
mpatzekov

How to make WP Super Cache Work?

January 27, 2015 3.7k views

Hi guys!

I am experiencing some really strange problems on my Wordpress website. So, to begin with, I have the following configuration.

Ubuntu 14.04, Apache 2.4.7 with CGI/FastCGI enabled, SSL installed and all traffic 301 to https version. Mod SPDY also enabled.

The thing is that can't make this WP super cache plugin work in preload mode. Recently, I have made a custom cron job via "crontab -e" command and added the following line:

*/1  *   *   *   *  wget -q -O - http://mywebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

To be honest, I really don't know if it is a cron job problem or it's something else.

Actually, when I hit the "preload cache now" button, the plugin trigers caching activity but stucks around the 30th cached page (it's different everytime). This is done withing 20 seconds. I left it this way yesterday and now I see that for approximately 24 hours it has cached around 450 pages. Actually, I know (because I've used it in my previous hosting) that when I hit the "preload cache now" button, it caches my all 1000 pages in around 40 minutes. And the cron job for my previous account was set to */15 * * * * .

Does somebody have even the slight idea what may be causing this slow caching problem?

3 comments
  • Are you seeing anything related to Super Cache in your error logs? You may need to enable debugging in its settings first.

  • Hmm, yes. I checked them before, but couln't actually figure out why this was happening. For example, here's an extract from my log files:

    11:37:09 /wp-admin/options-general.php?page=wpsupercache&tab=contents&action=regenerate_cache_stats&_wpnonce=391cd1df4d wp_cache_get_cookies_values: /^wp-postpass|^comment_author_|^wordpress_logged_in_9fbe0b2230e9c3b12cf4aa678de7329b/ Cookie detected: wordpress_logged_in_9fbe0b2230e9c3b12cf4aa678de7329b
    11:37:09 /wp-admin/options-general.php?page=wpsupercache&tab=contents&action=regenerate_cache_stats&_wpnonce=391cd1df4d In WP Cache Phase 2
    11:37:09 /wp-admin/options-general.php?page=wpsupercache&tab=contents&action=regenerate_cache_stats&_wpnonce=391cd1df4d Setting up WordPress actions
    11:37:09 /wp-admin/options-general.php?page=wpsupercache&tab=contents&action=regenerate_cache_stats&_wpnonce=391cd1df4d Not caching wp-admin requests.
    11:37:09 /wp-admin/options-general.php?page=wpsupercache&tab=contents&action=regenerate_cache_stats&_wpnonce=391cd1df4d maybe_stop_gc: GC flag not found. GC will go ahead..
    11:37:36 /category/holidays/easter/ No wp-cache file served as user agent rejected.
    11:37:37 /category/holidays/easter/ In WP Cache Phase 2
    11:37:37 /category/holidays/easter/ Setting up WordPress actions
    11:37:37 /category/holidays/easter/ Created output buffer
    11:37:37 /category/holidays/easter/ supercache dir: /var/www/wp-content/cache/supercache/founterior.com/category/holidays/easter/
    11:37:37 /wp-cron.php?doing_wp_cron=1422617857.2724730968475341796875 In WP Cache Phase 2
    11:37:37 /wp-cron.php?doing_wp_cron=1422617857.2724730968475341796875 Setting up WordPress actions
    11:37:37 /wp-cron.php?doing_wp_cron=1422617857.2724730968475341796875 Supercache caching disabled. Only using wp-cache. Non empty GET request. Array
    (
        [doing_wp_cron] => 1422617857.2724730968475341796875
    )
    
    11:37:37 /wp-cron.php?doing_wp_cron=1422617857.2724730968475341796875 Created output buffer
    11:37:37 /wp-cron.php?doing_wp_cron=1422617857.2724730968475341796875 Not caching POST request.
    11:37:37 /wp-cron.php?doing_wp_cron=1422617857.2724730968475341796875 wp_cache_maybe_dynamic: returned $buffer
    11:37:38 /category/holidays/easter/ USER AGENT (Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)) rejected. Not Caching
    11:37:38 /category/holidays/easter/ wp_cache_maybe_dynamic: returned $buffer
    11:37:54 /outdoor-garden-furniture-and-decoration-ideas/ No wp-cache file served as user agent rejected.
    11:37:54 /outdoor-garden-furniture-and-decoration-ideas/ In WP Cache Phase 2
    11:37:54 /outdoor-garden-furniture-and-decoration-ideas/ Setting up WordPress actions
    11:37:54 /outdoor-garden-furniture-and-decoration-ideas/ Created output buffer
    11:37:54 /outdoor-garden-furniture-and-decoration-ideas/ supercache dir: /var/www/wp-content/cache/supercache/founterior.com/outdoor-garden-furniture-and-decoration-ideas/
    11:37:55 /outdoor-garden-furniture-and-decoration-ideas/ USER AGENT (DoCoMo/2.0 N905i(c100;TB;W24H16) (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)) rejected. Not Caching
    11:37:55 /outdoor-garden-furniture-and-decoration-ideas/ wp_cache_maybe_dynamic: returned $buffer
    11:38:01 /wp-cron.php?doing_wp_cron In WP Cache Phase 2
    11:38:01 /wp-cron.php?doing_wp_cron Setting up WordPress actions
    11:38:01 /wp-cron.php?doing_wp_cron Supercache caching disabled. Only using wp-cache. Non empty GET request. Array
    (
        [doing_wp_cron] => 
    )
    
    11:38:01 /wp-cron.php?doing_wp_cron Created output buffer
    11:38:02 /wp-cron.php?doing_wp_cron URI rejected. Not Caching
    11:38:02 /wp-cron.php?doing_wp_cron wp_cache_maybe_dynamic: returned $buffer
    
  • Try easycron.com out, easy to find issue.

Be the first one to answer this question.