I've erased all of the comments from the WordPress site using SQL Instructions, both wordpress_comments &lifier wordpress_commentmeta are empty.

It has erased all of the comments the main problem I presently have is will still be exhibiting that old comment number using: <?php comments_number('0 Comments','1 Comment','% Comments'); ?>

For instance a publish will have: "4 Comments" displayed despite the fact that individuals comments don't exist.

Any ideas on how you can sort this out?

Any assistance is appreciated.

Regards.

You have to totally reset the comment_count area in wordpress_posts '0' too - it stores it for the reason that table therefore it does not need to do the counts in the comments tables each time....

EDIT (according to comment):

You are able to run a simple query:



UPDATE wp_posts
set comment_count = 0


Be cautious :) this does not possess a where clause (a filter) so there's no returning when you do that. It is going to update all of your posts to achieve the comment count to become '0'. If you're able to create a backup of the DB, that might be good.

Also, is dependent on which tool you're using to operate the query, you may want to place the DB title:



UPDATE yourdbname.wp_posts
set comment_count = 0