Last active
May 10, 2016 08:38
-
-
Save s9011514/017d550a387072f78736ae51de665286 to your computer and use it in GitHub Desktop.
批次刪除WordPress垃圾留言
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 批次刪除不存在的迴響之meta值 */ | |
DELETE FROM wp_commentmeta WHERE comment_id NOT IN (SELECT comment_id FROM wp_comments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 請將 188.143.232.32 換成您要過濾的IP */ | |
DELETE FROM wp_comments WHERE comment_author_IP = '188.143.232.32'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 刪除所有歸類為 spam 的留言 */ | |
DELETE from wp_comments WHERE comment_approved = 'spam' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment