Pingbacks and Trackbacks work again in WordPress

For quite some time, i had a problem getting pingbacks and trackbacks working. Receiving them wasn’t a problem, but i couldn’t send any. It seems, i’m not alone and no where were any answers to be found..

I think i found the problem: the function spawn_cron (/wp-includes/cron.php, 153) opens a socket to then wp-cron.php file after adding a new scheduled item. For that reason it runs the function wp_remote_post which also accepts a timeout parameter. That parameter is set to 0.01 by default. I guess these are seconds (which means these are 10 milliseconds!) and for some webservers this value is simply too small. Change that to something bigger (i’m using 0.1 or 1) and pingbacks and trackbacks should work again..

Now what about the old trackbacks and pingbacks that didn’t get sent? Actually you’ll simply need to write a new post and all the old unsent pings should be scheduled for sending. If you don’t want to do that, you could install the plugin Wp-Crontrol where you can specify a hook to be scheduled to a specific time. Schedule the hook “do_pings” to be triggered any time soon (parameter should be empty = “[]“) and it should take care of the old pingsbacks.