How to disable pingbacks and trackbacks in WordPress

To disable pingbacks and trackbacks in WordPress, go to Settings → Discussion and untick Allow link notifications from other blogs (pingbacks and trackbacks) on new posts. That covers posts you publish from now on. For existing posts, select them on the Posts screen and set Pings to Do not allow with Bulk Edit.

A pingback is an automatic notification that another site linked to your post. It shows up as a comment containing a link to that site. The system dates from the early days of blogging and is now used mostly by spammers to get links onto other people's pages.

Step by step

1. See whether you are receiving them

Open Comments and look for entries whose author is a site name and whose text is an excerpt in brackets with ellipses. Those are pingbacks or trackbacks. Filter the list using the comment type dropdown, where Pings shows them all. Many from unrelated sites means the feature is being abused. A list made of your own post titles means self-pings, covered in step 4.

2. Turn them off for new posts

  1. Go to Settings → Discussion.
  2. Under Default post settings, untick Allow link notifications from other blogs (pingbacks and trackbacks) on new posts.
  3. On the same screen, untick Attempt to notify any blogs linked to from the post if you also want to stop your site sending pingbacks to others.
  4. Click Save Changes.

As the label says, this is a default for new posts. Posts published earlier keep their own setting.

3. Turn them off for existing posts

  1. Open Posts → All Posts and raise the number of rows under Screen Options.
  2. Tick the header checkbox to select all, choose Edit in Bulk actions and click Apply.
  3. In the Bulk Edit panel, set Pings to Do not allow.
  4. Click Update, and repeat for each page of the list, then for Pages.

For a large site, WP-CLI does it in one command:

bash
wp post list --post_type=post,page --ping_status=open --format=ids | xargs wp post update --ping_status=closed

4. Stop self-pings

When you link from one of your posts to another, WordPress pings your own site and adds a pingback comment to the older post. With incoming pingbacks disabled, these are no longer accepted. If you want to keep pingbacks from other sites but drop your own, remove internal links from the ping list:

php
add_action( 'pre_ping', function ( &$links ) {
    $home = home_url();
    foreach ( $links as $key => $link ) {
        if ( 0 === strpos( $link, $home ) ) {
            unset( $links[ $key ] );
        }
    }
} );

Core passes the list of URLs to this action by reference just before sending, so removing entries here cancels those pings.

5. Remove the pingback header

WordPress still advertises its pingback address in an X-Pingback HTTP header on posts, and many themes print a <link rel="pingback"> tag. In Hydrogen SEO → General → Crawl cleanup, switch on Remove pingback header and tag. Two limits apply. A pingback tag typed directly into a theme's header.php stays until you edit the theme. And the switch stops the address being advertised, not the endpoint itself: a site that already knows the address can still try it, which is why the Discussion settings above come first.

6. Clean up what is already there

Existing pingback comments remain on your posts. In Comments, filter by Pings, select all and move them to the bin, or keep the handful that come from sites you recognise. Check that your theme is not displaying a "Pingbacks" list under posts. If it is, it disappears when the comments are deleted.

7. Verify

bash
curl -sI https://example.com/a-post/ | grep -i x-pingback

No output means the header is gone. Then publish or update a post that links to another of your posts and confirm no new pingback comment appears on the linked post.

Do pingbacks matter for SEO

Not positively. Links inside comments, pingbacks included, are saved with rel="nofollow ugc", so they pass no ranking credit to the linking site and bring you nothing either. The downsides are real, though: spam pingbacks put links to low-quality sites on your pages, moderation takes time, and every pingback request is server work. Disabling them costs you nothing in search.

About XML-RPC

Pingbacks arrive through xmlrpc.php, which has also been used to make sites send requests to third parties. If nothing you use needs XML-RPC, such as the mobile app with older authentication or a remote publishing tool, your host or a security plugin can block that file entirely. To remove only the pingback method and leave the rest working:

php
add_filter( 'xmlrpc_methods', function ( $methods ) {
    unset( $methods['pingback.ping'] );
    return $methods;
} );

Common questions

What is the difference between a pingback and a trackback?

A pingback is sent automatically when one WordPress site links to another. A trackback is sent manually by the author. Both appear as comments, and one setting controls both.

Will disabling pingbacks remove existing ones?

No. It stops new ones. Delete existing pingback comments from the Comments screen by filtering for Pings.

Does turning off pingbacks affect normal comments?

No. Comments have their own setting on the same screen and continue to work.