New answers tagged xml-rpc
If you're on a remote server, XMLRPC would be best, but requires login details If you're in a PHP script on the same server, wp-load.php would be best ( XMLRPC will involve a request of sorts ) If you're in a bash or CLI script, WP CLI would be best, e.g.: wp post create --post_type=page --post_status=publish --post_title='A future post' ...
The answer has already been given, so don't take this as a rep-steal, but for those who don't know how to do this, I have a blog article explaining how.
There is a more hackish way to do this? According to Wiktionary hackish means: poorly designed workarounds You could do it directly via SQL or even generate some .sql file and import it directly to your database ;-) This path will probably be unflexible and even muddy, but hackish yes ;-) But in general I would go with number 2).
Which one uses less resources? Neither, really. I don't need any support for plugins, theming, etc. I think you've answered your own question. Go for the latter technique (wp-load.php).
So far as I know, the XML RPC class is not instantiated unless needed, which is when the request is to /xmlrpc.php. You would instantiate the class the same way the Core does: include_once(ABSPATH . 'wp-admin/includes/admin.php'); include_once(ABSPATH . WPINC . '/class-IXR.php'); include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php'); /** * ...
The plugin Secure XML-RPC seems to address the issue of sending sensitive info over the wire. Plugin description: Rather than sending usernames and passwords in plain text with every request, we're going to use a set of public/secret keys to hash data and authenticate instead.
Top 50 recent answers are included