Support » Plugin: WP Super Cache » How to fix WP Super Cache not working properly on pages other than homepage?

  • Resolved niklas.buschner

    (@niklasbuschner)


    I have a WordPress website set up with WP Super Cache to make it faster. The main problem is that the caching seems to work properly on the homepage with very low TTFB but on pages other than the homepage TTFB is very slow.

    Disclaimer: I also use Autoptimize but I double-checked with it enabled and disabled and the problem stayed. I’m writing this since I noticed some discussions about high TTFB where the problem was related to Autoptimize-plugin.

    I’m running WordPress 4.9.9 with a custom-made theme and hosting is built on 1and1 IONOS (https://www.ionos.de/).

    This is how my WP Super Cache config looks like: https://i.imgur.com/fdxfiKIl.png

    The main problem is that the caching seems to work properly on the homepage (https://landhaus-himmelpfort.de/) with TTFB between 100 and 130 ms. On pages other than the homepage (e.g. https://landhaus-himmelpfort.de/zimmer/) although TTFB is very slow with up to 8 seconds. I checked the times with Chrome Developer Tools.

    What seems strange to me is that when looking at the source code of the a sub page I see the WP Super Cache watermark. In this cache it is: https://landhaus-himmelpfort.de/zimmer/

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Donncha Ó Caoimh

    (@donncha)

    There’s something odd happening on that site. The html comment at the end says it’s cached but the timestamp changes each time meaning it’s being regenerated each time.

    Enable the debug log in the plugin and see what the plugin is doing when you load various pages. That should tell you a lot.

    Thanks for pointing me in the direction to solve the issue. I activated the debug logs and opened the page (…/zimmer) and reviewed the log. I post it underneath. Do you have a suggestion where to start with fixing the issue?

    12:43:30 42087 /zimmer/ wp_cache_get_cookies_values: return: 
    12:43:30 42087 /zimmer/ wp_cache_get_cookies_values: return: 
    12:43:30 42087 /zimmer/ wpsc_get_realpath: directory does not exist - /homepages/28/d209392407/htdocs/wp-content/cache/blogs/zimmer/
    12:43:30 42087 /zimmer/ wpsc_get_realpath: directory does not exist - /homepages/28/d209392407/htdocs/wp-content/cache/blogs/zimmer/meta/
    12:43:30 42087 /zimmer/ supercache dir: /homepages/28/d209392407/htdocs/wp-content/cache/supercache/landhaus-himmelpfort.de/zimmer/
    12:43:30 42087 /zimmer/ No Super Cache file found for current URL: /homepages/28/d209392407/htdocs/wp-content/cache/supercache/landhaus-himmelpfort.de/zimmer/index-https.html
    12:43:30 42087 /zimmer/ wp_cache_get_cookies_values: return: 
    12:43:30 42087 /zimmer/ In WP Cache Phase 2
    12:43:30 42087 /zimmer/ Setting up WordPress actions
    12:43:30 42087 /zimmer/ Created output buffer
    12:43:30 42087 /zimmer/ wp_cache_get_cookies_values: return: 
    12:43:30 42087 /zimmer/ wpcache_do_rebuild: doing rebuild for /homepages/28/d209392407/htdocs/wp-content/cache/supercache/landhaus-himmelpfort.de/zimmer/
    12:43:30 42087 /zimmer/ wpcache_do_rebuild: base file found: /homepages/28/d209392407/htdocs/wp-content/cache/supercache/landhaus-himmelpfort.de/zimmer/wp-cache-blogb4933ef9c0708ce1807df429a7d91320.php
    12:43:30 42087 /zimmer/ wpcache_do_rebuild: base file found: /homepages/28/d209392407/htdocs/wp-content/cache/supercache/landhaus-himmelpfort.de/zimmer/meta-wp-cache-blogb4933ef9c0708ce1807df429a7d91320.php
    12:43:30 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 wp_cache_get_cookies_values: return: 
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 wp_cache_get_cookies_values: return: 
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 In WP Cache Phase 2
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 Setting up WordPress actions
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 Not caching wp-admin requests.
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 maybe_stop_gc: GC flag not found. GC will go ahead..
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 wp_cache_gc_cron: Set GC Flag. (/homepages/28/d209392407/htdocs/wp-content/cache/landhaus-himmelpfort.de_wp_cache_gc.txt)
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 Cache garbage collection.
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 Cleaning expired cache files in /homepages/28/d209392407/htdocs/wp-content/cache/blogs/blog/
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 GC completed. GC flag deleted.
    12:43:31 42107 /wp-cron.php?doing_wp_cron=1561207410.9271240234375000000000 scheduled wp_cache_gc for 10 seconds time.
    12:43:36 42087 /zimmer/ Output buffer callback
    12:43:36 42087 /zimmer/ wp_cache_get_cookies_values: return: 
    12:43:36 42087 /zimmer/ Gzipping buffer.
    12:43:36 42087 /zimmer/ Writing gzipped buffer to wp-cache cache file.
    12:43:36 42087 /zimmer/ Renamed temp wp-cache file to /homepages/28/d209392407/htdocs/wp-content/cache/supercache/landhaus-himmelpfort.de/zimmer/wp-cache-blogb4933ef9c0708ce1807df429a7d91320.php
    12:43:36 42087 /zimmer/ Writing gzip content headers. Sending buffer to browser
    12:43:36 42087 /zimmer/ wp_cache_shutdown_callback: collecting meta data.
    12:43:36 42087 /zimmer/ Writing meta file: /homepages/28/d209392407/htdocs/wp-content/cache/supercache/landhaus-himmelpfort.de/zimmer/meta-wp-cache-blogb4933ef9c0708ce1807df429a7d91320.php
    

    Follow-Up: If there is someone who can help with this problem, I would definitely donate an appropriate amount (we can agree one before) via PayPal. I just don’t know what to do to get this problem fixed.

    I don’t really know how, but I solved the issue 😀

    edit: It was related to the cookie notice plugin. For now I deactivated it since the workarounds or improvements didn’t work for me.

    Will there be a official update with an improved functionality concerning cookie notice banners soon?

    Plugin Author Donncha Ó Caoimh

    (@donncha)

    There already was, but the cookie banner plugin developers have to do some extra work to support caching. There’s more in this post: https://odd.blog/2018/07/20/wp-super-cache-and-cookie-banners/

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.