There is the option to turn off trackbacks/pingbacks under Settings > Discussion
.
But I’d like remove the X-Pingback
header WordPress sends and completely remove the the trackback
endpoint.
Is there a way to do this?
There is the option to turn off trackbacks/pingbacks under Settings > Discussion
.
But I’d like remove the X-Pingback
header WordPress sends and completely remove the the trackback
endpoint.
Is there a way to do this?
You must be logged in to post a comment.
Use this for a plugin in /wp-content/plugins or /wp-content/mu-plugins (for auto-activation). Or functions.php.
Funny thing is I sell a WordPress Remote Publishing Library and gave you the code to disable XMLRPC 🙂 Bad for reputation.
@EarnestoDev had a great answer, but it’s a little outdated now since recent xml-rcp exploits.
I’ve made an updated version that I think blocks all possible access to it. Take note though that there are a few plugins out there that utilize the XML-RPC pingback/trackback functionality and could have issues if you are using them:
Here’s an updated version below. To download it you can copy it into a plugin file, drop in in mu-plugins or download it on github:
Also, if you want to close all existing pingback follow these steps:
1) Open phpmyadmin and navigate to SQL section:
2) Enter the following:
3) All existing pingbacks should now be closed