Tuesday, December 22, 2009

WordPress Stops Pinging – How To Fix It?




I started noticed this when I upload my client site Game Previews made under WordPress 2.9, don’t get me wrong the new update is fantastic and some of the new features are extremely useful to use, but, and this is a big but, after installing the Wordpress 2.9, every time I made a post or used a ping back or trackback my WordPress blog would not ping or send pingbacks to other sites!

But now after searching for the answer! why my client Wordpress got that trouble I found the answer to this site blazingminds.co.uk . He did a little tweak to the file "wp-includes/cron.php" And he did fixed the problem!

If you look at the original code for cron.php you will find the following code:

$cron_url = get_option( ’siteurl’ ) . ‘/wp-cron.php?doing_wp_cron’;
wp_remote_post( $cron_url, array(‘timeout’ => 0.01, ‘blocking’ => false, ’sslverify’ => apply_filters(‘https_local_ssl_verify’, true)) );

You will notice that he have made a bit bold! This is what you need to change, change this to 1 so now it should read:

$cron_url = get_option( ’siteurl’ ) . ‘/wp-cron.php?doing_wp_cron’;
wp_remote_post( $cron_url, array(‘timeout’ => 1, ‘blocking’ => false, ’sslverify’ => apply_filters(‘https_local_ssl_verify’, true)) );

Now you should find that you pings are now working again, hopefully, I checked mine via the Ping Optimizer plugin and the log on the plugin confirmed a ping status!

Please remember before using this tweak, back up your original “wp-includes/cron.php” file, just in case, you never know ;) Thanks to blazingminds.co.uk.

1 comment:

john said...

hai,, tq for this information...:)