Title: Wrong comment count
Last modified: August 31, 2016

---

# Wrong comment count

 *  Resolved [c2cero](https://wordpress.org/support/users/c2cero/)
 * (@c2cero)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/wrong-comment-count-1/)
 * After moving several comments, the comment count is wrong
 * Take a look:
 * From:
    [http://www.ciudadano2cero.com/curso-online-seo-monetizacion/](http://www.ciudadano2cero.com/curso-online-seo-monetizacion/)
 * The counter counts more comments that there actually are
 * To:
    [http://www.ciudadano2cero.com/promocion-curso-seonautas-semrush/](http://www.ciudadano2cero.com/promocion-curso-seonautas-semrush/)
 * The counter counts less comments that there actually are
 * This is very annoying 🙁
 * [https://wordpress.org/plugins/copy-or-move-comments/](https://wordpress.org/plugins/copy-or-move-comments/)

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

 *  Thread Starter [c2cero](https://wordpress.org/support/users/c2cero/)
 * (@c2cero)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/wrong-comment-count-1/#post-7313724)
 * Seems that the comment count gets mixed up sometimes by this and other plugins.
 * Found a nice Fix that worked fine for here:
 * [http://bit.ly/1ra0V2O](http://bit.ly/1ra0V2O)
 * Nevertheless you should fix this in your plugin.
 * Here the code of the post slightly modified by me since it was tied to a specific
   database name:
 * /* Query for checking before and after fixing posts/pages with wrong count */
   
   SELECT wpp.id, wpp.post_title, wpp.comment_count, wpc.cnt FROM wp_posts wpp LEFT
   JOIN (SELECT comment_post_id AS c_post_id, count(*) AS cnt FROM wp_comments WHERE
   comment_approved = 1 GROUP BY comment_post_id) wpc ON wpp.id=wpc.c_post_id WHERE
   wpp.post_type IN (‘post’, ‘page’) AND (wpp.comment_count!=wpc.cnt OR (wpp.comment_count!
   = 0 AND wpc.cnt IS NULL));
 * /* Query for actually fixing the count for all affected posts */
    UPDATE wp_posts
   wpp LEFT JOIN (SELECT comment_post_id AS c_post_id, count(*) AS cnt FROM wp_comments
   WHERE comment_approved = 1 GROUP BY comment_post_id) wpc ON wpp.id=wpc.c_post_id
   SET wpp.comment_count=wpc.cnt WHERE wpp.post_type IN (‘post’, ‘page’) AND (wpp.
   comment_count!=wpc.cnt OR (wpp.comment_count != 0 AND wpc.cnt IS NULL));
 *  Plugin Author [AppJetty](https://wordpress.org/support/users/biztechc/)
 * (@biztechc)
 * [10 years ago](https://wordpress.org/support/topic/wrong-comment-count-1/#post-7314075)
 * Thanks c2cero for pointing mistake,we will update this in next release.
 *  Plugin Author [AppJetty](https://wordpress.org/support/users/biztechc/)
 * (@biztechc)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/wrong-comment-count-1/#post-7314090)
 * Hi c2cero,
 * We have solved wrong counter issue in latest release.
    Thanks

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

The topic ‘Wrong comment count’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/copy-or-move-comments_ecb4c1.svg)
 * [Copy or Move Comments](https://wordpress.org/plugins/copy-or-move-comments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/copy-or-move-comments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/copy-or-move-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/copy-or-move-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/copy-or-move-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/copy-or-move-comments/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [AppJetty](https://wordpress.org/support/users/biztechc/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/wrong-comment-count-1/#post-7314090)
 * Status: resolved