Title: wp_posts question &#8211; comment_count
Last modified: October 31, 2022

---

# wp_posts question – comment_count

 *  Resolved [Tim Burkart](https://wordpress.org/support/users/bigmoxy/)
 * (@bigmoxy)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/wp_posts-question-comment_count/)
 * I am upgrading a site that contains thousands of spam comments. Can I empty the
   wp_comments and wp_commentmeta tables and then zero out the comment_count column
   in the wp_posts table?
 * Thank you.

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

 *  [Hugh Lashbrooke](https://wordpress.org/support/users/hlashbrooke/)
 * (@hlashbrooke)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/wp_posts-question-comment_count/#post-16147548)
 * Hi Tim,
 * If you can edit the database, then yes – doing that will be safe and work just
   fine. That being said, I would strongly recommend that you back up your site 
   and database before you make any changes there, even if they appear to be safe.
   That way, you can always roll back if anything unexpected happens.
 *  Thread Starter [Tim Burkart](https://wordpress.org/support/users/bigmoxy/)
 * (@bigmoxy)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/wp_posts-question-comment_count/#post-16147590)
 * Thank you [@hlashbrooke](https://wordpress.org/support/users/hlashbrooke/)!

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

The topic ‘wp_posts question – comment_count’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Tim Burkart](https://wordpress.org/support/users/bigmoxy/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/wp_posts-question-comment_count/#post-16147590)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
