How To Diagnose And Fix Incorrect Post Comment Counts In WordPress
Updated: September 16th, 2012

Introduction
If your WordPress comment counts got messed up, whether because of a plugin (I'm talking about you, DISQUS) or you messed with your database manually and did something wrong (yup, that's what I just did), fear not – I have a solution for you.
But first, a little background.
Comment Counts In WordPress
Here's how comment counts work in WP:
- Posts live in a table called wp_posts and each has an ID.
- Comments reside in a table called wp_comments, each referring to an ID in wp_posts.
- However, to make queries faster, the comment count is also cached in the wp_posts table, rather than getting calculated on every page load.
If this count ever gets out of sync with
…
Updated: November 9th, 2007
So today I was looking for a proper sources.list file that would work for apt-get in SUSE 10.2 since the one in yast and smart repositories comes with a broken list. And by broken I mean completely f***ed.
apt-get update Err ftp://mirrors.mathematik.uni-bielefeld.de SuSE/10.2-i386 release Could not resolve 'mirrors.mathematik.uni-bielefeld.de' Get:1 ftp://ftp4.gwdg.de SuSE/10.2-i386 release Ign ftp://ftp4.gwdg.de SuSE/10.2-i386 release Err ftp://mirrors.mathematik.uni-bielefeld.de SuSE/10.2-i386/base pkglist Could not resolve 'mirrors.mathematik.uni-bielefeld.de' Err ftp://mirrors.mathematik.uni-bielefeld.de SuSE/10.2-i386/base release Could not resolve 'mirrors.mathematik.uni-bielefeld.de' Err ftp://mirrors.mathematik.uni-bielefeld.de SuSE/10.2-i386/update pkglist Could not resolve 'mirrors.mathematik.uni-bielefeld.de' Get:1 ftp://ftp4.gwdg.de SuSE/10.2-i386/base pkglist Err ftp://mirrors.mathematik.uni-bielefeld.de SuSE/10.2-i386/update release Could not resolve 'mirrors.mathematik.uni-bielefeld.de' Err ftp://ftp4.gwdg.de SuSE/10.2-i386/base pkglist Unable to fetch file, server said 'Failed to open file. ' Err ftp://mirrors.mathematik.uni-bielefeld.de SuSE/10.2-i386/security pkglist Could not resolve 'mirrors.mathematik.uni-bielefeld.de' Get:2 ftp://ftp4.gwdg.de SuSE/10.2-i386/base release Err
…
beer planet is a blog about technology, programming, computers, and geek life. It is run by Artem Russakovskii - a local San Francisco geek who is currently pursuing his own projects and regularly enjoys hacking Android, PHP, CSS, Javascript, AJAX, Perl, and regular expressions, working on Wordpress plugins and tools, tweaking MySQL queries and server settings, administering Linux machines, blogging, learning new things, and other geeky stuff.