0

I've received an old wordpress 2.8 and successfully upgraded to WP3.2.1. I've just discovered that the amount of comments displayed in the WP Admin 's list of posts is wrong.

Would you know how i could fix that by, perhaps, running a clever SQL update query in the database, that would fetch the real number of comments associated to a post and update the post row accordingly?

1

I nailed it:

UPDATE wp_posts as p SET comment_count =(SELECT count(*) FROM `wp_comments` WHERE `comment_post_ID`=p.ID);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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