Skip to content

Instantly share code, notes, and snippets.

@joshuadavidnelson
Created July 19, 2014 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuadavidnelson/d5630e1103a7faa65b70 to your computer and use it in GitHub Desktop.
Save joshuadavidnelson/d5630e1103a7faa65b70 to your computer and use it in GitHub Desktop.
Disable pingbacks
<?php
/**
* Disable pingbacks
*
* Useful to secure your site from *potential* xmprpc DDoS attacks, but it does disable the pingback feature and could conflict with other plugins
*
* http://l.jdn.im/disable-pinkback
**/
add_filter( 'xmlrpc_methods', function( $methods ) {
unset( $methods['pingback.ping'] );
return $methods;
} );
@joshuadavidnelson
Copy link
Author

FYI, the DDoS hack was fixed in WordPress Version 3.6. See also this post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment