Getting 500 spam comments daily? Most are pingback spam from scrapers.
Disable Pingbacks:
// functions.php
add_filter('wp_headers', function($headers) {
unset($headers['X-Pingback']);
return $headers;
});
add_filter('xmlrpc_enabled', '__return_false');
add_filter('wp_xmlrpc_server_class', '__return_false');
Settings: Settings → Discussion → Uncheck ‘Allow link notifications from other blogs’
Result: 90% less spam. No legitimate functionality lost.
