Ha valaki elszórakozta volna az adatbázisát, és valamiért az oldala nem a helyes hozzászólások számát mutatná, akkor itt egy PHP kód, ami segít ezt rendbe tenni:
[code]
<?php
header ( "Content-type: text/plain" );
error_reporting ( E_ALL );
echo "Including files\n";
require_once 'mysql_connect.php';
require_once 'wp-load.php';
require_once 'wp-includes/comment.php';
echo "Files included\n";
echo "Selecting IDs from posts\n";
$query = mysql_query ( "SELECT ID FROM PrEfIx_posts" ) or die ( mysql_error () );
echo "IDs selected from posts\n";
while ( $row = mysql_fetch_row ( $query ) ) {
wp_update_comment_count_now ( $row [0] );
echo "Updated post with ID $row[0]\n";
ob_flush ();
flush ();
ob_end_flush ();
}