From version 2.4.7, the WP Discourse Plugin includes a Discourse Comments block for the Block Editor. The Discourse Comments block is primary way to add Discourse Comments to a block-enabled theme such as Twenty Twenty Three. Here’s a short video on how to use the Discourse Comments block
I think you should exclude comments from caching. That is common procedure. Caching is only for static content by its nature, and commenting isn’t part of that.
My WordPress site has a very high traffic volume, with around 5-8 million visits per day, and approximately 200 million visits per month. These statistics come from Cloudflare.
As a result, I’ve implemented full page caching, which can be considered static pages. Therefore, I want the comments to be dynamically loaded via AJAX. In addition to displaying the comments in real-time, I also want to ensure that comments do not cause any performance degradation in WordPress.
Has nothing to do with nature of your site. The most are useless seo-bots, scrapers and knockers. There is only about dozen you want, and easily 99% of total amount only increases the load of your server.
I mean you should first take that load off, and after that start wondering if showing discourse comments are an issue.
Hey @shuaiZend, thanks for trying to explain. However, I’m still not quite sure what the problem is? The comments are loading when you have “Load comments with Ajax” disabled. Why not just leave that setting disabled?
Because WordPress has a lot of traffic and uses full page cache, I hope to dynamically load comments in the form of ajax without affecting the performance of WordPress.
I still can’t understand why you don’t exlude commenting from caching, as you should (and BTW what is guided by a plugin that does caching for you; if you do caching via a reverse proxy, as Nginx or Varnish, that job is even easier).
And you really should kill the overload, that isn’t coming from people. And tune up your php-fpm settings.