WordPress.org

Support

Support » Plugins and Hacks » iThemes Security (formerly Better WP Security) » [Plugin: Better WP Security] 403 Error Running wp-cron from Crontab

[Plugin: Better WP Security] 403 Error Running wp-cron from Crontab

  • I have two sites running Better WP Security, one a typical WordPress install, the second incorporating BuddyPress and bbPress.

    In an effort to improve performance I disabled the triggering of wp-cron.php with page loads in wp-config.php and instead created entries in crontab like this:

    0,10,20,30,40,50 * * * * /usr/bin/lynx http://www.mywebsite.net/wp-cron.php -dump > /dev/null

    I did this for both sites. On the simple site it seems to work, but I see a 403 error on the BuddyPress site. I suspect it has something to do with the settings in Better WP Security but I can’t work out what I’ve done differently. I’m guessing it relates to .htaccess but beyond that I’m at a loss. Any suggestions as to where I should be looking?

    http://wordpress.org/extend/plugins/better-wp-security/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have the same 403 error and can’t figure out what’s causing it. I’m not running BuddyPress or bbPress but can’t run wp-cron.php using crontab without getting the 403 error. It works fine if the plugin is disabled.

    I found the solution to my issue. It seems that one of the agents that Better WP Security blocks is “wget” which is the method I was using to call wp-cron.php. I commented that line out and it seems to be working now.

    Turns out this didn’t solve the problem. The search continues…

    Okay, I figured this one out now. I don’t know if it will work for anyone else but it worked for me. The problem I had was that Better WordPress security was blocking execution of a page using both wget and lynx. I added a custom user agent to the lynx command and now it works fine. Here’s the line:

    lynx -useragent=”Lynx” -head -dump http://www.notreallymysite.com/wp-cron.php?doing_wp_cron

    Hi asocalguy,

    Kind of same issues this end but with a different plugin and I’m pretty sure it’s Better WP Security performing its tasks too well!

    Thanks for posting the solution above but which file is it placed into?

    Many thanks
    Andy

    Sorry for the delay; I didn’t get notified that you had posted a reply.

    The command I posted doesn’t go in a file. It’s an example of a command you’d schedule and run with crontab in Linux/Unix.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Better WP Security] 403 Error Running wp-cron from Crontab’ is closed to new replies.
Skip to toolbar