WordPress comment count
This statement corrects all the comment count in WP posts by querying every posts actual comments:
UPDATE wp_posts p SET p.comment_count = (
SELECT count(*) FROM wp_comments
WHERE comment_post_id = p.id AND
comment_approved = 1 );
3 Comments to “WordPress comment count”
Leave a Reply

Where do we put this code?
@steven: You execute it on your WP installation’s database.
How do I do that in PhpMyAdmin? I have no experience in Mysql is it possible you can give me a detailed run down how to go about it?Thank you so much