Many spammers used Pingbacks and Trackbacks to create spam content on your WordPress site. This tutorial will help you to disable pingbacks and trackbacks in WordPress. Also, remove old pingbacks and trackbacks from the database.
Disable Pingbacks and Trackbacks
Use this option to disable pingbacks and trackbacks from new articles. Go to WordPress admin panel and then go Settings >> Discussion option. Now uncheck the box showing in below screenshot under Default article settings section.
Disable for Existing Articles
The above option will disable the pingbacks and trackbacks for new articles, but you still needs to disable it for existing articles. You can do this by directly querying the database. Change table name wp_posts with your table name if you are using a different prefix.
mysql> UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'post'; mysql> UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'page';
Remove Pingbacks and Trackbacks
Finally, you need to remote Pingbacks and Trackbacks from existing articles. Use below query to remote it. You may need to change table name wp_comments if using different table prefix.
mysql> DELETE FROM wp_comments WHERE comment_type = 'trackback';
2 Comments
WordPress filters messed up my previous comment by removing the STYLE tags from the last line of code. Maybe one of these will display correctly…
echo "\n label[for=\"ping_status\"] {display:none} \n";
You can also make it difficult (but not impossible) for editors to override the trackback/pingback setting by adding this to your theme’s functions.php file: