The new comments will not show if you do not exclude the page from caching.
To remove this goto Cache advanced settings and remove the page from the box under “URLs to exclude from caching“
The new comments will show because they will load via Ajax. After I made a test comment with wpDiscuz, suddenly no page was cached anymore, it started acting really weirdly. And even when I removed all comments I couldn’t make the plugin start caching again. I had to reinstall it.
You should check your plugin with wpDiscuz.
I then commented on line 75 in file-based-page-cache.php
/*radan*//* if (!empty($_COOKIE['wpo_commented_post'])) {
$no_cache_because[] = 'The user has commented on a post (comment cookie set)';
}*/
and line 67 in file-based-page-cache-functions.php to prevent other issues
/*radan*/ //$no_cache_because[] = __('Comments are opened and the visitor saved his information.', 'wp-optimize');
Radan
“and remove the page from the box under “URLs to exclude from caching“
This box is empty.
- Go to Cache >> advanced setting s > Always Purge URL(s) and add the URL sub-domain defined for the individual posts in your website. It is imperative that you use the proper wildcard (*) and slashes (/) for your affected posts (pages). For example, if your individual blog URLs (permalinks) have the format
https://www.mywebsite.com/blog/mywebsiteblogpost/, then use the following exclusion URL format: https://www.mywebsite/blog/*/
- Purge Cache: Purge all cache in the following sequence (wait one minute after clearing cache for each item): Theme, WP Rocket, SG Optimizer, Cloudflare, Browser
- Perform Verification Test: Go back to your affected Blog or News post, enter a test comment, and verify the above works.
If you still do not see comments displayed on your affected pages after following the above procedure, please check your wpDiscuz General Settings and make sure “Use WordPress native AJAX functions” is ON