I just updated a site from EE1 to EE2 that had pretty much nothing but spam comments. I deleted all the comments with a query:

DELETE FROM exp_comments WHERE status = 'o';

But on the blog listing page, the {comment_total} tag is still showing that comments exist. For example:

<a href="{path='blog/post'}">{comment_total} Comment(s) &raquo;</a>



Even though there are no comments in the database for that entry.

I also went into the exp_channels table and set the total_comments column to 0 for the blog channel.

When I upgraded from EE1 to 2, I opted to convert trackbacks to comments, could that be what's causing the phantom comments? There's no exp_trackbacks table anymore, so I'm not sure where they might be hiding.

I guess ultimately what I need to know is where does EE get its comment_total count from?

3 Answers 3


Have you tried CP > Tools > Data > Recount Statistics?

  • That did it, thanks! I have never used that tool before now.
    – kmgdev
    Commented Feb 26, 2013 at 16:13

Total comments are actually stored in the exp_channel_titles data table, so you would either need to use the Recount Statistics Tool, as @Ryan Masuga suggested or set the comment_total field in exp_channel_titles equal to zero, using a MySQL query. The Recount Statistics tool is the easiest method, unless you don't want all comment numbers to be reset.

  • Good info, thanks! Ryan got there first so he got the accept, but thank you for answering!
    – kmgdev
    Commented Feb 26, 2013 at 16:16

It's possible the page is cached so it's worth clearing the cache to eliminate that as the issue.

CP Location: Tools ‣ Data ‣ Clear Caching

  • 1
    I already tried that with no success, but it's always a good suggestion, thanks!
    – kmgdev
    Commented Feb 26, 2013 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.