Implementing WordPress XML-RPC

You can write standalone pages that can add, edit and modify WordPress content by using XML-RPC communication. To do so you must first enable the XML-RPC option in the Settings->Writing panel. Once you’ve done that you can try the following code:

define('BLOG_ID', 0);
define('RPC_USERNAME', 'sanraul');
define('RPC_PASSWORD', '******');
$client = new IXR_Client('http://localhost:8888/xmlrpc.php');
$client->query('wp.getCategories', BLOG_ID, RPC_USERNAME, RPC_PASSWORD);
$categories = $client->getResponse();

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

IMPORTANT! To be able to proceed, you need to solve the following simple math (so I know that you are a human) :-)

What is 13 + 10 ?
Please leave these two fields as-is: