How to Disable Trackbacks and Pingbacks in WordPress

You can stop WordPress trackback and pingback spam with built-in settings. Turn off link notifications for future posts, close pings on existing content, remove unwanted items from the Comments area, and verify that no publishing workflow depends on them.

Quick path: Go to Settings > Discussion, clear Allow link notifications from other blogs (pingbacks and trackbacks) on new posts, and save. This affects new posts only.

What trackbacks and pingbacks are

Trackbacks and pingbacks are older methods for notifying one site that another site linked to it. WordPress can display accepted notifications near comments. Today, many sites receive more automated spam and self-pings than useful discussion, so disabling them is a reasonable default for most business sites.

Disable them for future posts

  • Open the WordPress dashboard.
  • Go to Settings, then Discussion.
  • Clear Allow link notifications from other blogs (pingbacks and trackbacks) on new posts.
  • Select Save Changes.

The wording says new posts because this setting does not change existing content. The separate option that tries to notify linked blogs controls outgoing notifications. Turn that off too if you do not want WordPress sending pings.

Close pings on existing posts in the dashboard

  • Go to Posts, then All Posts.
  • Select the posts you want to change. Increase Screen Options temporarily if you need a larger batch.
  • Choose Edit from Bulk actions and select Apply.
  • Set Pings to Do not allow, then update.
  • Repeat for other pages or public post types that expose the setting.

Use smaller batches on a large site and take a database backup first. Bulk edits may trigger hooks, cache invalidation, or search indexing work.

Use WP-CLI for controlled operations

On a site with WP-CLI, first preview the IDs, then update them. Run this in staging and replace the post types if needed:

wp post list --post_type=post,page --post_status=publish --format=ids
wp post update $(wp post list --post_type=post,page --post_status=publish --format=ids) --ping_status=closed

A very large site may exceed command-line limits. Process IDs in batches and record the change. WP-CLI uses WordPress APIs, which is usually preferable to a direct database edit.

Direct SQL option and safety

Use SQL only when you have a tested backup, the correct table prefix, and a clear rollback. Preview the affected rows before updating:

SELECT ID, post_type, post_title, ping_status
FROM wp_posts
WHERE post_type IN ('post', 'page') AND ping_status = 'open';

UPDATE wp_posts
SET ping_status = 'closed'
WHERE post_type IN ('post', 'page');

Replace wp_ with the site’s real prefix. Flush relevant caches afterward and verify a sample of posts.

Remove existing trackback spam

Closing pings stops new notifications on the selected content but does not delete existing entries. Review the Comments screen, filter spam, and remove items only after confirming nothing legitimate is needed. On a business-critical site, keep an export or backup before a large deletion.

Trackbacks, pingbacks, and XML-RPC

Pingbacks can involve the WordPress XML-RPC endpoint. Turning off discussion settings is not the same as blocking all XML-RPC features. Remote publishing, mobile apps, Jetpack, or integrations may depend on the endpoint. Read how to disable XML-RPC safely before applying a server-level block.

How to verify the change

  • Create a test post and confirm the discussion setting is closed.
  • Check a sample of old posts after the bulk change.
  • Review server and application logs for unexpected XML-RPC or publishing errors.
  • Watch the Comments and Spam views for new pingbacks.
  • Confirm normal comments, forms, mobile publishing, and integrations still work.

Enterprise recommendation

For multisite or large publishing teams, enforce the desired default through platform configuration, document any site-level exception, and monitor it. Treat disabling pings as spam reduction, not as a complete security program. Broader controls belong in a WordPress security hardening review.

Primary sources

Frequently asked questions

No direct ranking benefit depends on accepting trackbacks or pingbacks. Keep useful editorial citations in the article itself and manage comments according to your community policy.

No. It changes the default for new posts. Use Bulk Edit, WP-CLI, or a carefully reviewed database update for existing content.

They serve a similar notification purpose, but their protocols differ. WordPress groups them together in discussion settings.

Yes, if Allow people to submit comments remains enabled for the relevant posts. Pings and comments have separate controls.

Only if you have confirmed that mobile apps, remote publishing, Jetpack, and other integrations do not need it.

No. WordPress settings and bulk tools cover the common case. A plugin may help enforce policy across a complex network, but it is not required.

Mehul Gohil
Mehul Gohil

Mehul Gohil is a Full Stack WordPress developer and an active member of the local WordPress community. For the last 13+ years, he has been developing custom WordPress plugins, custom WordPress themes, third-party API integrations, performance optimization, and custom WordPress websites tailored to the client's business needs and goals.

Articles: 163

Leave a Reply

Your email address will not be published. Required fields are marked *