wordpress xml-rpc timeout

I am trying to use xml-rpc to perform certain tasks on the wordpress installation.

this is what I am using

Read More
include_once '/local/www/xxxxxxxx/wp-includes/class-IXR.php';
$objClient = new IXR_Client('http://xxxxxxxx/xmlrpc.php');

if I do a print_r on the objClient I get the following

IXR_Client Object
(
    [server] => xxxxxxxx
    [port] => 80
    [path] => /library/xmlrpc.php
    [useragent] => The Incutio XML-RPC PHP Library
    [response] => 
    [message] => 
    [debug] => 
    [timeout] => 15
    [headers] => Array
    (
    )
    [error] => 
)

What I can’t figure out is what that 15 at the timeout means and why it times out. Any suggestion anyone?

Related posts

Leave a Reply

1 comment

  1. 15 is the maximum time in seconds before which if a connection is not made to the server, the client will stop it’s attempt. You can try setting it to higher value by looking into IXR documentation.

    Something like

    $objClient = new IXR_Client('xxxxxxxx', 'library/xmlrpc.php', 80, 30);
    

    will increase the time limit to 30 seconds, and should be sufficient.