Title: comment_count &#8216;bug&#8217; in WP 2.0?
Last modified: August 18, 2016

---

# comment_count ‘bug’ in WP 2.0?

 *  [planetthoughtful](https://wordpress.org/support/users/planetthoughtful/)
 * (@planetthoughtful)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/comment_count-bug-in-wp-20/)
 * Hi All,
 * I think there _might_ be a bug affecting the comment_count field in WP 2.0?
 * I recently uploaded my WP 2.0 blog to my remote host from my local machine to
   make it public. I had some test comments (for previewing my theme’s handling 
   of comments) against the couple of existing posts.
 * Once the site was loaded I used the admin pages to delete the test comments. 
   I can confirm that the wp_comments table is empty, however the comment_count 
   field in the wp_posts field wasn’t decremented by the appropriate number (which
   would have been back to 0 in the case of the two posts in question, since I deleted
   all of the comments associated with them) when these comments were deleted. One
   post shows a comment_count value of 4 (which was the number of test comments 
   against that post before I deleted them) and the other has a value of 1 (again,
   the number before deletion).
 * These values show up as the number of comments against those posts when you view
   the front page of my blog, but of course no comments are displayed (because they
   don’t exist) when you view either of the posts on their own.
 * Is this a known issue? I couldn’t find any results on a search for comment_count.
   If it is a known issue, is there a known workaround? I can probably hack the 
   code myself to make deleting comments update comment_count in wp_posts appropriately,
   but I’d rather go with a WP solution, rather than mine, if one exists.
 * Many thanks,
 * planetthoughtful

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Truth](https://wordpress.org/support/users/truth/)
 * (@truth)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/comment_count-bug-in-wp-20/#post-327656)
 * Are you using Spam Karma?
 * There was an issue with the comment count, upgrade to the latest version 2.1 
   if you are. 🙂
 *  Thread Starter [planetthoughtful](https://wordpress.org/support/users/planetthoughtful/)
 * (@planetthoughtful)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/comment_count-bug-in-wp-20/#post-327669)
 * No, sorry, I did see that in other posts and I should have mentioned that I’m
   not using Spam Karma at all.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘comment_count ‘bug’ in WP 2.0?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [planetthoughtful](https://wordpress.org/support/users/planetthoughtful/)
 * Last activity: [20 years, 3 months ago](https://wordpress.org/support/topic/comment_count-bug-in-wp-20/#post-327669)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
