☰
WEB SECURITY / PRACTICE

How to Disable Pingback and Trackback in WordPress and Reduce the Risk of Abuse

How to Disable Pingback and Trackback in WordPress and Reduce the Risk of Abuse

Pingback and trackback are legacy WordPress mechanisms for notifying websites about links between them. When one site links to another, WordPress can send or receive a special request and create a corresponding entry in the comments.

For a modern website, this functionality is usually unnecessary. Pingback can be abused for spam, generating large numbers of outbound requests, DDoS amplification, and hidden requests to internal or local addresses. Disabling pingback and trackback does not replace comprehensive XML-RPC protection, but it removes one unnecessary abuse channel.

What Is the Difference Between Pingback and Trackback

Trackback is an older mechanism for notifications between blogs. It works through a special URL and often creates a notification that is moderated like a comment. In practice, trackback has long been used primarily for spam.

Pingback works through XML-RPC. WordPress automatically notifies the site to which a link points, and that site can verify the link and create a corresponding entry. The ability to process external XML-RPC requests is what makes pingback attractive to attackers.

It is important to distinguish between receiving pingbacks from other sites and sending pingbacks when publishing links. Disabling one setting may not close both scenarios, so check how the site behaves after making changes.

  • Pingback is associated with XML-RPC and can generate outbound requests from your server.
  • Trackback is a legacy communication channel that is often used for spam comments.
  • Disabling these features does not affect regular comments, the block editor, or Elementor.

Disable Pingback and Trackback in WordPress Settings

First, disable the feature in the standard settings. In the administration panel, open the discussion settings section. Field names may vary slightly depending on the WordPress language or version, but look for an option similar to “Allow link notifications from other blogs (pingbacks and trackbacks) on new posts” and clear the checkbox.

This change generally applies to new posts. It does not always change the settings of posts that have already been published, so older content should be checked separately.

If the site has multiple authors, also review their publishing habits. The settings for an individual post may differ from the global value, especially after content has been imported or the site has been migrated.

  • Open the discussion settings in the WordPress administration panel.
  • Clear the option to receive link notifications from other blogs.
  • Save the changes and create a test draft containing a link to an external resource.
  • Check the discussion settings for posts that have already been published.

How to Disable Trackback and Pingback for Older Posts

For a small number of posts, this can be done through bulk editing. Open the list of posts, select the required content, apply the bulk edit action, and disable trackback and pingback if the option is available in your administration panel.

On large sites, do not run SQL queries directly against the database without proper verification. Manually changing values can damage other post settings. Before taking such action, create a backup and involve an administrator who understands the table structure and how WordPress stores these settings.

  • Delete unwanted trackback and pingback comments from the comments list.
  • Check posts where these notifications were already enabled.
  • Do not delete regular comments solely because they look similar: a trackback may contain service fields or the source URL.

How to Further Block Pingback with Filters

If the standard setting is not sufficient, pingback can be disabled at the WordPress filter level. One filter blocks processing of the pingback.ping method through XML-RPC, while another prevents WordPress from automatically sending pingbacks when posts are published.

It is better to add the code to a child theme or through a trusted mechanism for custom code snippets. Do not add it directly to the files of the main theme: the changes may disappear after an update. Create a backup before applying the code and test the site in a staging environment.

  • The xmlrpc_methods filter removes the specific pingback.ping method without blocking XML-RPC entirely.
  • The pre_ping filter prevents WordPress from preparing outbound pingback requests automatically.
  • After installing the filters, check publishing, comments, integrations, and error logs.
add_filter( 'xmlrpc_methods', function ( $methods ) {
    unset( $methods['pingback.ping'] );
    return $methods;
} );

add_filter( 'pre_ping', '__return_false' );

Do You Need to Block All of XML-RPC

No, not in every case. Pingback uses XML-RPC, but XML-RPC may be required by other features, including mobile clients, external services, certain publishing tools, or integrations. Completely blocking the XML-RPC endpoint without checking dependencies can disrupt established workflows.

If XML-RPC is not used, it can be restricted at the WordPress, web server, or WAF configuration level. This decision should be made after reviewing logs and actual integrations. To preserve compatibility, selectively blocking the pingback.ping method is often safer than blocking the entire endpoint.

At the web server or CDN level, it is appropriate to apply request-rate limits, WAF rules, and monitoring for XML-RPC requests. Do not use untested Nginx or Apache rules on a production site: a configuration error can block legitimate requests or make the site unavailable.

  • Do not confuse blocking pingback with completely disabling XML-RPC.
  • Before blocking XML-RPC, check mobile applications, external publishing tools, and other integrations.
  • Do not rely solely on hiding the xmlrpc.php address; this is not protection.
  • Apply request limits and WAF rules together with updates to WordPress, themes, and plugins.

Verify the Result After Disabling the Features

After changing the settings, make sure that pingback is not re-enabled by a theme, plugin, or import procedure. Perform the check in a staging environment or during a period of low traffic if the site is critical to the business.

Review web server and security-tool logs. A large number of POST requests to XML-RPC, repeated requests from the same IP addresses, or unusual outbound requests may indicate abuse attempts. A single log entry does not by itself prove an attack, so assess the frequency, source, and impact of the requests.

Also check that new trackback comments are not appearing, that the site is not creating unexpected outbound connections, and that required integrations continue to work.

  • Create a test post with an external link and check whether a pingback is generated.
  • Review the settings of both new and older posts.
  • Check the comments list after several test publications.
  • Repeat the check after updating the theme and plugins.
  • Document the changes so that an administrator does not accidentally re-enable the feature.

Common Mistakes When Hardening WordPress

The most common mistake is clearing the checkbox in the global settings and assuming that older posts are protected as well. In reality, the settings for published content may remain unchanged.

Another problem is installing several security plugins with conflicting rules. This can cause XML-RPC errors, caching issues, or the blocking of legitimate requests. It is better to follow a clear policy: disable unnecessary pingback and trackback, restrict XML-RPC when necessary, keep components updated, and monitor logs.

Elementor itself is not the reason pingback operates. If suspicious requests appear after editing a page, check WordPress, plugins, the theme, integrations, and server configuration rather than looking only at the page builder.

  • Do not treat an anti-spam plugin as a replacement for disabling an unnecessary protocol.
  • Do not insert code into a parent theme without understanding the consequences of updates.
  • Do not block all of XML-RPC without checking dependent services.
  • Do not ignore old spam comments or posts with trackback enabled.

Frequently asked questions

Will regular comments stop working after disabling pingback and trackback?

No. These features are separate from regular comments. Users will still be able to leave comments unless commenting has been disabled by other settings.

Is disabling pingback in the discussion settings enough?

For new posts, this is the basic step, but older content may retain its previous settings. For stronger protection, also check older posts and use filters if necessary.

Do I need to disable XML-RPC completely?

Not necessarily. If the site or its integrations use XML-RPC, selectively blocking pingback.ping is preferable. Complete disabling should only be considered after checking dependencies.

Will this protect against all DDoS attacks?

No. Disabling pingback removes one specific abuse channel but does not protect against all network attacks. Comprehensive protection requires a WAF or CDN, request limits, monitoring, up-to-date software, and backups.

Conclusion

For most WordPress sites, pingback and trackback are unnecessary, so they should be disabled in the global settings and older posts should be checked. Additional filters can block pingback processing through XML-RPC and prevent these notifications from being sent automatically.

After making the changes, check integrations, server logs, and site behavior following updates. This does not replace XML-RPC protection, a WAF, or general WordPress hardening, but it reduces the attack surface and unnecessary spam.

← All web security materials