GICT knowledge base
How to Disable Pingbacks and Trackbacks in WordPress
Published
In this tutorial, we are going to discuss how to disable pingbacks and trackbacks on your WordPress website.
Pingbacks and Trackbacks
Trackbacks and Pingbacks are link notifications that enable you to keep track of when other sites link to your website contents. If the notifications are enabled, you will get alerts in the comments section of your posts. If you want to protect your contents from other users, you can disable Pingbacks and trackback feature.
Disable Pingbacks and Trackbacks from WordPress Dashboard
1) Login to WordPress Dashboard.
2) Navigate to “Settings”.
3) Click on “Discussion”.
4) Uncheck the second option “Allow link notifications from other blogs (pingbacks and trackbacks)”.
5) Click the “Save Changes” button at the bottom of the page.
Inserting Code to Disable Self Pingbacks
Paste the below code in your theme’s functions.php file to disable self-pingbacks.
function no_self_ping( &$links ) {
$home = get_option( ‘home’ );
foreach ( $links as $l => $link )
if ( 0 === strpos( $link, $home ) )
unset($links[$l]);
}
add_action( ‘pre_ping’, ‘no_self_ping’ );
If you need any further help please do reach our support department.
Related guides
7 Common Hosting Mistakes Beginners Make (And How to Avoid Them)
7 common hosting mistakes beginners make in 2026: no backups, ignored updates, bad host choice, weak passwords, single point of failure, no staging. With fixes for each.
WordPressWebsite Migration Backup Checklist: What to Save and How to Test
Prepare a website migration backup: inventory files, databases, email and DNS, check archive integrity, test recovery and plan a safe final synchronization.
WordPressCore Web Vitals in 2026: A Practical Fix Guide for Site Owners
Core Web Vitals 2026: practical fixes for LCP, INP, and CLS. Real root causes, what to measure, common misconceptions, and a priority order of fixes for site owners.
WordPressFixing the WordPress “Death Loop”: When Missing Files slow down your site
You’ve just launched your new WordPress site or pushed a big update. In your staging environment, everything ran perfectly.



