Disabling Trackbacks and Pings in WordPress

If you’ve started receiving suspicious trackbacks or pings from other blogs on your WordPress site, you are not alone. Like so much on the web, these useful tools have become slaves for spammers or people looking to increase their page rankings. If you would like to stop this blog spam on your site, you can turn off trackbacks and pings under Settings -> Discussion “Allow link notifications from other blogs (pingbacks and trackbacks.)”.

However, like so much in WordPress, this setting does nothing to posts and pages already created. You can either edit each Post and Page under “Discussion” and turn off “Allow trackbacks and pingbacks on this page.” or run the following SQL from phpMyAdmin:

UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'post';
UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'page';

If you have access to your theme, you can also remove this tag:

<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

For a detailed introduction to how trackbacks and pingbacks work, please read Introduction to Blogging (Trackbacks and Pingbacks sections).