Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    first of all, while checking your site I think you have already deactivated this plugin on your website. As I do not see any cache-control header or any x-wp-cf-* in the response header.

    But one thing that I see is that your page is loading a bunch of custom cookis in the page load. Screenshot: https://i.imgur.com/qL5hGIi.jpeg

    Anytime Cloudflare sees any custom cookies in the page header, it will never cache that page thinking the cookie values might be used inside the page to serve content dynamically.

    But if the page is cached, then no PHP gets run and hence the content cacnnot be generated dynamically. That’s why CF doesn’t cache the page.

    So, you need to find which plugins are adding these cookies and disable/remove them. Then enable the plugin and set it up to check the response header.

    Thread Starter bobbobbius

    (@bobbobbius)

    Thanks for reply.

    Yes, the whole point is that “Plugin Super Page Cache for Cloudflare” are active and we didnt see him!

    I’ve earlier deactivated it, uninstall and reinstall it again, but nothing change.

    Now i deactivated all plugins except SPCC.
    https://prnt.sc/1IVEuZhj3ufz

    When i try to deactivate SPCC i got a fatal error and nothing change – i cannot deactivate SPCC!)

    2022-06-24 10:49:34 Error 500
    GET /wp-admin/plugins.php?action=deactivate&plugin=wp-cloudflare-page-cache%2Fwp-cloudflare-super-page-cache.php&plugin_status=all&paged=1&s&_wpnonce=bdf37827e8 HTTP/1.0 https://kvo.center/wp-admin/plugins.php Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36 3.21 К
    Access to Apache SSL/TLS

    2022-06-24 10:49:36 Error AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function opcache_get_status() in /var/www/vhosts/1money.school/kvo.center/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php:3059\nStack trace:\n#0 /var/www/vhosts/1money.school/kvo.center/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php(687): SWCFPC_Cache_Controller->purge_opcache()\n#1 /var/www/vhosts/1money.school/kvo.center/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php(1152): SWCFPC_Cache_Controller->purge_all()\n#2 /var/www/vhosts/1money.school/kvo.center/wp-content/plugins/wp-cloudflare-page-cache/wp-cloudflare-super-page-cache.php(1044): SWCFPC_Cache_Controller->reset_all()\n#3 /var/www/vhosts/1money.school/kvo.center/wp-includes/class-wp-hook.php(307): SW_CLOUDFLARE_PAGECACHE->deactivate_plugin()\n#4 /var/www/vhosts/1money.school/kvo.center/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()\n#5 /var/www/vhosts/1money.school/kvo.center/wp-includes/plu…’, referer: https://kvo.center/wp-admin/plugins.php
    Apache errors

    Plugin Contributor iSaumya

    (@isaumya)

    For the opcache error ->
    go into the plugin settings -> under the advanced tab -> Turn Off the OPCache option.
    Screenshot: https://i.imgur.com/K4JMDTt.jpeg

    But now coming to the other point, despite the plugin being active I am not sure why no headers are getting added to the response header. Maybe the .htaccess rules are not working perly.

    Also check if your server has some other server-level page caching system enabled, if so try disabling that.

    Thread Starter bobbobbius

    (@bobbobbius)

    Ok – i confirm – i Turned Off the OPCache option and i could deactivate plugin.

    I reinstall plugin and also enabled option “Strip response cookies on pages that should be cached” – now it all works as expected)

    Thanks for help!

    Plugin Contributor iSaumya

    (@isaumya)

    Please note that I generally never recommend enabling the Strip response cookies option as it removes all the cookies from the page. So, if you actually have some cookies that is actually used within your website to dynamically show content even that won’t work.

    So, if you enable this option – it is highly recommended that you test your site thoroughly across all possible scenarios to make sure it is working as expected.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Page caching not working for both dynamic and static pages’ is closed to new replies.