Limpando Akismet e Spam

De MochilaWiki
Ir para navegaçãoIr para pesquisar
DELETE FROM aps_commentmeta WHERE comment_id NOT IN ( SELECT comment_id FROM aps_comments );
DELETE FROM aps_commentmeta WHERE meta_key LIKE '%akismet%';
OPTIMIZE TABLE aps_commentmeta;
OPTIMIZE TABLE aps_comments;


remove todos os comentários que estão no SPAM

DELETE from wp_comments WHERE comment_approved = 'spam';

remove todos os comentários que estão em pendências

DELETE FROM wp_comments WHERE comment_approved = 0;

remove por periodo

DELETE FROM wp_comments
WHERE comment_date > '2004-11-15 01:10:04'
AND comment_date <= '2004-11-20 00:10:04'

remove o que está na lixeira

DELETE from wp_comments WHERE comment_approved = 'trash';