• blog
  • Wordpress Comment Count

WordPress Comment Count



I use the akismet wordpress plugin to nuke spam. This eventually screws up the consistency of the wordpress database resulting in incorrect comment counts in some blog posts. Thankfully, this is quite trivial to fix with a few tweaks on the MYSQL database. Here is a script to do just that.

Disclaimer: Although the script fixed my database, you should verify that your symptoms are the same. I am not liable for any issues due to this script :-).

3 Responses to “WordPress Comment Count”

  1. Hi I am having the same problem but I didnt use Akismet but used WP-SpamFree plugin to stop spam as well.

    I am getting incorrect comment numbering. How do i use your MySQL script? I’m not familiar with it, where do I put this?

    Please help

    thank you

  2. I am facing the problem too.

    Can you elaborate what your Perl script does? My server doesn’t support Perl, so I’m unable to run it. With some info, I can manually do what the script does. Also – does the script need to be run everytime there’s a mismatch, or does your script fix the bug permanently (or atleast until the next WP upgrade?) Thank you!

    As a temporary solution, check out: http://me.enirav.com/?p=603

    This trick worked for me, though its a little troublesome to do it frequently.

  3. @Steven: you just have to run the script from a unix command line. If not, you can take the underlying sql query and run it.

    @Nirav: Yes, you may have to run the script periodically. WP upgrade may not fix it as it doesn’t really seem to be a WP issue.

Leave a Reply