Disable Self Pingbacks in WordPress

This post demonstrating how to disable self pingbacks in WordPress. For that firstly we have to know what is pingback in WordPress or WordPress pingbacks and trackbacks. Then we can proceed for the rest which is how to turn off pingbacks in WordPress or disable pingbacks in WordPress. By default wordpress allow the feasibility to turn off all pingbacks. We will discuss in this post all the possible way to turn off or disable pingbacks methods in WordPress. You can disable WordPress self pingbacks by WordPress disable pingbacks plugin or by manually. Lets go through each section and get a clear idea about self pingback and how to disable pingbacks and trackbacks.

Basically pingback is a good way to notify you when your post linked in some other blogs. It helps to build link exchange relationship with the same niche blogger. Whenever someone linked your post to their post and publish, you will get an email notification. But it is annoying for busy blogger to maintain this because it also send email notification whenever you linked your post in some another post in one word if you make an interlink in your blog. Interlinking is a good factor for SEO but this thing quite annoying.

So, Now you are achieved the basics and what are the basic difference between them. Now we will learn how to disable self pingbacks. You can also disable all pings from WordPress.

Disable Self Pingbacks in WordPress

We can disable pingbacks or self pingack basically in two ways using WordPress disable pingbacks plugin and another way is manually. So which blogger don’t have coding knowledge in WordPress they can go with the first option from here. But we always recommend to use less plugins for good SEO and faster load time.

Disable Self Pingbacks in WordPress Using Plugin

For that you can use Disable XML-RPC Pingback or No Self Pings Plugin. After downloading one of these plugins you need to activate and disable self pingback in wordpress automatically. And you will find that from outside ping coming but self pinging mail not appear.

Turn off Self Pingbacks Manually

Turn off or disable self ping without any plugin you can achieve. You have to write 3,4 line of code in your theme function.php and have to check which ping are coming they content your own domain name or not. Below code will help you to better understand how to turn off self pingback without using any plugin in WordPress.

//Define function for disable self ping..
function disable_only_self_ping(&$links) {
//Get the home link value..
	$home_value = get_option('home');
//Check position of string in the links and check own link exist or not...
	foreach($links as $i => $link)
		if (strpos( $link, $home_value) === 0)
//If found unset the element from the array
			unset($links[$i]);
}
//call the function before ping... 
add_action( 'pre_ping', 'disable_only_self_ping' );

In this way you can check the ping URL and can disable manually if it is self pingback. Thanks for take some time with this post. Share and like will be appreciated also help us to improve ourselves.

Leave a Reply

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