How to stop xmlrpc attacks without disabling component to allow JetPack to work in WordPress?

With a whitelist, you typically deny all first, then allow. Then just keep adding Allow entries as needed. Try this: <Files xmlrpc.php> Order Deny,Allow Deny from all Allow from 122.248.245.244/32 Allow from 54.217.201.243/32 Allow from 54.232.116.4/32 Allow from 192.0.80.0/20 Allow from 192.0.96.0/20 Allow from 192.0.112.0/20 Allow from 195.234.108.0/22 Satisfy All ErrorDocument 403 http://127.0.0.1/ </Files> Note: … Read more

XML-RPC and post_date

There are a couple of issues here. First of all, wp.editPost takes a fourth parameter before the content struct -> the ID of the post you’re trying to edit (should be an integer). Second, you’re passing a string for the post_date, so the client automatically converts this to a <string> tag before sending it to … Read more

Why is minimum_args protected?

You can totally swap out the class that runs the xmlrpc server. So create a subclass of wp_xmlrpc_server, use it for the xmlrpc server class, and use all the protected methods you like. Example (not tested, use with caution): <?php class WPSE69959_XMLRPC_Sever extends wp_xmlrpc_server { // override the constructor to add your own methods. public … Read more

Checking post format during xmlrpc_publish_post

This is because of a variable mismatch. Your function accepts $post_ID, but you don’t actually use it. You’re instead trying to reference a global $post object and doing your post format check with $post->ID. With the XML-RPC request, this won’t work. Rewrite your function to use get_post() to fetch a post object from the passed-in … Read more

XMLRPC filtering through htaccess not working

The directives in .htaccess (on your application server) would seem to be working as expected. Yet I keep getting requests on that file. Blocking the request in .htaccess doesn’t stop the request reaching your server (and being logged). As you can see from the log entry, it is being “blocked” and your server is responding … Read more

Posting via HTTP requests?

the XML-RPC protocol can do that for you, look up how to use it with curl: http://shoaibmir.wordpress.com/2009/03/10/using-curl-for-xmlrpc-calls/ and what the actual tags are: http://codex.wordpress.org/XML-RPC_Support

WordPress can’t find IXR_Client

You mean class-IRC.php or class-IXR.php? Just include the files before you call IXR_Client. I use such code to call IXR_CLIENT and it worked on my site: include_once( ABSPATH . WPINC . ‘/class-IXR.php’ ); include_once( ABSPATH . WPINC . ‘/class-wp-http-ixr-client.php’ ); $client = new WP_HTTP_IXR_CLIENT( ‘http://othersite.com/xmlrpc.php’ );