February 21, 2008

wp-o-matic cron install problem

Posted in Linux, Open Source, wordpress tagged , , , , , , at 2:57 am by ilanco

WP-o-Matic is a cool auto-blogging plugin for wordpress.

After installation you’ll have to change cron.php if you want to use automatic feed fetching via crontab.

  1. take note of the code wp-o-matic will give you on installation.
  2. open cron.php in your favorite editor
  3. add this piece of code after the <?php opening tag :
    if ($argc > 0)
    {
    for ($i=1;$i < $argc;$i++)
    {
    parse_str($argv[$i],$tmp);
    $_REQUEST = array_merge($_REQUEST, $tmp);
    }
    }
  4. fire up crontab -e and add something like the following line to it :
    */20 * * * * php /DIR_TO_WP/wp-content/plugins/wp-o-matic/cron.php code=YOURCODE
    change DIR_TO_WP with you path to wordpress and YOURCODE with the code you noted in step 1
  5. Save the file and cron will run your fetcher every 20 minutes.
  6. You’re done, go add some rss feeds.