WP-o-Matic fix for Wordpress 2.5

May 1st, 2008
No Gravatar

WP-o-Matic makes autoblogging a easy by automatically creating posts from the RSS/Atom feeds you give it. Unfortunately, the latest release doesn’t work very well, by itself or on Wordpress 2.5. Watch out for my post on fixing Wordpress 2.5 issues.

But for now, here is a fix for the faulty cron.php bundled with 1.0pre5

<?php
 
require_once(dirname(__FILE__) . '/../../../wp-config.php');
 
nocache_headers();
 
// if uninstalled, let's not do anything
if(! get_option('wpo_version')) {
  echo "Not installed\n";
  exit();
}
// check password
if(isset($argv['1']) &amp;&amp; $argv['1'] == get_option('wpo_croncode')) {
	require_once( dirname(__FILE__) . '/wpomatic.php' );
	echo "Running cron\n";
	$wpomatic-&gt;runCron();
}
else {
	$wpomatic-&gt;log('Warning! cron.php was called with the wrong password or without one!');
	echo "Warning! cron.php was called with the wrong password or without one!";
	exit();
}
?>

* Note, this will only work from a local cron, not WebCron.

Add this to your cron

*/20 * * * * php /PATH_TO_FILE/cron.php b1591282

You can find the PATH_TO_FILE in Settings -> WP-o-Matic -> Options

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Was this post useful to you? Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the General, PHP, Wordpress category.

One Response to “WP-o-Matic fix for Wordpress 2.5”

  1. Penko PenevNo Gravatar Says:

    Not working for me

Leave a Reply