Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Disable Self Pingbacks in WordPress (Step by Step)

We’ve worked on blogs with hundreds of internal links, and one thing that used to drive us crazy was the flood of self-pingbacks in the comments section.

Every time we linked to our own content, WordPress would treat it like a new comment. It clutters the discussion and makes real comments harder to spot.

If you’re seeing those too, you’re not alone. Many WordPress users don’t even realize what’s causing them or how to turn them off.

In this guide, we’ll show you how to disable self-pingbacks in WordPress. You can use a plugin or a small code snippet — whatever feels easier for you.

Turning off self-pingbacks in WordPress

What Is a Pingback?

A pingback is a way for WordPress websites to notify each other when one post links to another. It’s kind of like a remote comment — but automatic.

Here’s how it works:

  1. We publish a blog post on WPBeginner.
  2. You write a post on your site and include a link to our article.
  3. Your WordPress site sends us a pingback — a little digital “heads up.”
  4. Our WordPress site checks your link and, if valid, displays the pingback as a comment on our post.
  5. This comment just shows a link back to your article. That’s it.

Pingbacks don’t just work between blogs — they also happen inside your own site. If you link to one of your posts from another, WordPress sends what’s called a “self-pingback.”

Pingback preview

Want to learn more? Check out our full guide on trackbacks and pingbacks.

Why You Should Turn Off Self-Pingbacks in WordPress

We’ve tested how users interact with pingback links, and the results were clear — people rarely click on them. They’re easy to overlook, especially when they show up in the comments section.

But when we added the same links directly into the article, they got way more attention. That’s because in-context links are easier to read and feel more natural to users.

Internal linking also plays a big role in SEO. It helps search engines understand the relationship between your pages and shows your expertise and authority on specific topics. Here’s our full guide to internal linking for SEO.

The problem is, every time you add an internal link, WordPress also creates a self-pingback. These show up in your comment moderation queue, where they add clutter and waste time if you’re not using them.

That’s why we disable self-pingbacks on all our sites. It keeps the comment section clean and lets us focus on links that actually help our readers — and our SEO.

Here’s how to easily disable self-pingbacks on your site:

Disable Self Pingbacks in WordPress Using Plugins

Several plugins let you disable self pingbacks in WordPress. We will show you three of them, and you can choose one that works for you.

This method is easier and recommended for most users. WPCode is the best WordPress code snippets plugin.

It allows you to easily add custom code in WordPress without breaking your site. It also comes with a ton of handy custom snippets that you may want to use on your site.

First, you need to install and activate the WPCode plugin.

WPCode's homepage

Note: A free version of WPCode is also available. However, to unlock the plugin’s full potential, we recommend upgrading to the paid version.

Why Do We Recommend WPCode?

We recommend WPCode because it is the easiest custom code snippets manager for WordPress. We use it on all our websites, and it has helped us easily manage and add custom code without installing separate plugins. To learn more, take a look at our complete WPCode review.

Once you have activated the plugin, go to the Code Snippets » +Add Snippet page. In the search box, type in ‘self pingback’, and it will show you the code snippet.

WPCode connect library

Click on the ‘Connect to Library to Unlock’ button.

This will open a popup where you can sign into your WPCode account and connect to the cloud library feature. Don’t forget to check the ‘Enable pushing snippets from the library to your site’ option.

Connect code library

If you don’t already have an account, then you can create one for free.

Connecting to the WPCode library gives you access to its library of free code snippets. You can also save and reuse your code snippets on your other websites.

Once connected to the WPCode library, return to Code Snippets » +Add Snippet page. In the search box, type in ‘self pingback’, and click ‘Use Snippet’ when the code snippet shows up.

Use snippet

The plugin will then open the code in a code snippet editor.

Here, the custom code snippet is automatically added. Simply toggle the status switch from ‘Inactive’ to ‘Active.’

Activate snippet

Don’t forget to click ‘Update’ to save your changes.

That’s all. Your WordPress website will now start using this custom code to disable self pingbacks.

2. Using No Self Pings Plugin

For this method, you will be using a plugin made for one task only.

You need to do is install and activate the No Self Ping plugin. The plugin works out of the box and will disable self pingbacks upon activation.

Want to disable pingbacks for some other sites you own as well? Simply head over to the Settings » Discussion page and scroll down to the bottom.

No Self Pings settings

Here, you can add any additional websites that you don’t want to pingback. These can be other websites you manage or any third-party websites you frequently link to.

Finally, don’t forget to click ‘Save Changes’ to store your settings.

3. Using Disabler Plugin

Another way to disable self pingbacks in WordPress is by using the Disabler plugin. It is explicitly made to disable unwanted features in WordPress.

First, you will need to install and activate the Disabler plugin. Upon activation, visit the Settings » Disabler page and switch to the ‘Backend’ tab.

Disabler prevent self-pingbacks

From here, check the box next to the ‘Disable self pings’ option. Below that, you can provide any additional URLs that you don’t want to pingback.

Don’t forget to click on the ‘Save Settings’ button to save your changes.

Turn Off Self Pingbacks Without Using a Plugin

If you do not want to use a plugin, you can use these two methods to turn off self pings on your site.

1. Turn Off Pingbacks Globally

WordPress allows you to turn off pingbacks on your site. This option disables the pingback feature completely on your site.

Simply go to the Settings » Discussion page. In the ‘Default post settings’ section, uncheck the box next to the Attempt to notify any blogs linked to from the post’ option.

Disable pingbacks globally

Lastly, click on the ‘Save Changes’ button to store your settings.

WordPress will now stop sending pingbacks to any website when you link to it.

2. Manually Insert Code to Disable Self Pingbacks

This method is essentially the same we described earlier in the WPCode section.

Instead of a ready-to-use code snippet, you can manually add the code snippet to your website.

This method could also be useful for users who don’t want to use WPCode plugin. For more details, see our tutorial on how to add custom code snippets in WordPress.

You need to simply copy and paste this code into WPCode. Alternatively, you can add it to your theme’s functions.php file or a site-specific plugin:

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

Don’t forget to save your changes and upload them to your site.

Once you have added this code, WordPress will stop sending pingbacks when you add an internal link.

Better Alternative to Self Pingbacks

The initial goal of adding pingbacks in WordPress was to enable communication between websites through links. However, spammers misuse them so much that most websites disable receiving trackbacks from other sites.

If you haven’t already, please take a look at our tutorial on how to disable trackbacks and pings in WordPress. It will save your website from a ton of unwanted spam.

Self pingbacks are pings to your own blog posts. For example, when you add a link to an older blog post, then a link to your new article will appear in its comment section.

However, the links appear at the bottom and don’t provide users with any context. We tracked those links and learned that users didn’t interact with them and that they didn’t add much value.

Instead, adding links in the article body worked much better. More users clicked on those links, increasing page views and boosting search rankings.

How to Add Links to Older Articles

We recommend that users make internal linking a habit and make it a part of their WordPress editorial workflow.

For our sites, we routinely update old articles with new information and add internal links pointing to newer articles when relevant.

We also use All in One SEO for WordPress, which is the best WordPress SEO plugin on the market. It also comes with a powerful linking tool called Link Assistant.

All in One SEO - Link Assistant overview

It allows you to track all links on your site, including internal links.

You will also see linking opportunities where the plugin will use AI to show you places where you can add new internal links.

The Linking Opportunities list in AIOSEO

For more details, see our detailed internal linking guide for beginners.

🧹 More Ways to Clean Up Your WordPress Comments

Self-pingbacks are just one of the many distractions that can clutter your WordPress site. If you’re looking to take full control of your comments section, reduce spam, and improve your site’s performance, these guides will help you get there:

We hope this article helped you disable self-pings on your WordPress site. You may also want to check our guide on customizing the WordPress admin dashboard for easier site management.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

25 CommentsLeave a Reply

  1. Dennis Muthomi

    The WPCode method is a real game-changer. It’s super clean and works great without needing extra plugins.
    One thing I’ve learned: teaching clients about manual internal linking is key. It’s not just about replacing self pingbacks – it actually helps with SEO and makes sites more user-friendly.

  2. Siva Mahesh

    Very helpful article. Finally able to disable to wierd feature of wordpress.

    • WPBeginner Support

      Glad our article was helpful :)

      Admin

  3. N.L Tayoh

    Very helpful article. The self-pingbacks were getting on my nerves already. Following this guide really help out.

    • WPBeginner Support

      Glad our guide was helpful :)

      Admin

  4. Aurora

    Does the code only disable self-pings? What if I want to alert other blogs except my own?

    • WPBeginner Support

      Hi Aurora,

      Yes, it only disables self pings. However, you will need to make sure that the option to notify other blogs when you link to them is checked on “Settings » Discussion” page.

      Admin

  5. Aditi Bisen

    Hi , can you please help me find the functions.php file. I wanted to try the paste the code option.
    Thank you

      • Aditi Bisen

        Hi,

        Thank you for your reply. I think I’m just silly, still cannot find it.
        Are the steps you suggested possible with the free version of WordPress?
        or do I need to be signed in to one of the paid plans.

        Thank you.

  6. muhammed hasnul banna

    Really helpful, self pingback is annoying

  7. Prasanna Sutrave

    I had unchecked the box from Discussion setting.

    Still, I have to use any No Self Pingback Plugin?

    Is it essential to use a plugin for No self Pingback?

    Please Reply.

    Thanks

  8. stancho

    i have all pingback features disabled but i want to know how to prevent other blogs from generating pingback linking to my site?

  9. Victor S.

    Thanks for this post! You probably have the best answers that are always straight to the point!!

  10. Heidi Pungartnik

    You guys rock. Every time I google for a super niche, obscure issue, I find your site and a simple, step-by-step guide to dealing with the issue. I love this site. Keep it up!

  11. sneha

    Is this code update works with wordpress multisite network to disable sub pingbacks set for posts?

  12. Samir

    Excellent, had no idea about pingbacks. I understand this is about Articles, but does this also apply to Products created in Woocommerce sites?

  13. Donna

    I just went to the site to check out the recommended plug in and got this message–Should we be concerned:
    his plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

    • WPBeginner Support

      Yes, it hasn’t been updated in a while but the plugin works fine and is compatible up to WordPress 4.3.

      Admin

      • Simon

        Even tested it out on my site, works fine with WordPress 5.4.1 :)

  14. Acadia on My Mind

    Found your blog mentioned in Feedfront magazine, and glad to come across this article. Does disabling self ping backs affect SEO? If so, is it worth taking that step?

      • Acadia on My Mind

        Thanks for the answer! Will disengage the auto ping back now that I know it doesn’t matter.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.