• Resolved allm

    (@realblueorange)


    Since I made some changes to my htaccess WordFence doesn’t auto-update and doesn’t auto-run the scan. Can you tell me what URL’s are used for that so I can change the htaccess again?

    By the way: everything else seems to work just fine.

    https://wordpress.org/plugins/wordfence/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WFMattR

    (@wfmattr)

    Both features rely on /wp-cron.php (part of the WordPress core) and the scans also need /wp-admin/admin-ajax.php.

    If enabling access to these does not help, you may need to check your site’s access log to see what is happening. For a scan, you should see lines containing the following:
    GET /wp-admin/admin-ajax.php?action=wordfence_doScan

    (There will be more parameters on the end.) If you can see the response code like 200, 403, 503, etc., that could narrow down the issue.

    -Matt R

    Thread Starter allm

    (@realblueorange)

    @wfmattr

    Thanks for your quick response. I can do a manual update or manual scan, so that is all OK. Also, it does everything else that it needs to do. It blocks things that are unwanted and so on. It’s just that the auto-update and the auto-scan don’t work. Can you tell me the HTTP_USER_AGENT you are using? In the mean time I will check the log.

    Thread Starter allm

    (@realblueorange)

    @wfmattr

    Just checked the logs. The manual scan and all other manual things can be found in the log. The auto-scan and auto-update are not there, probably because they are blocked in my htaccess. What else can you tell me about the GET that might trigger the block? Maybe the HTTP_USER_AGENT? Or anything else?
    BTW: the jobs are in the Wordfence Cron Viewer. The cron seems to be working just fine.

    Plugin Author WFMattR

    (@wfmattr)

    The user agent is the same as WordPress uses for its own functions, “WordPress/<version>; <site’s url>” — I’ve included a line from a log I have, of the beginning of a scan:

    "GET /wp-admin/admin-ajax.php?action=wordfence_doScan&isFork=0&cronKey=44ab2e1925ac38342031c329 HTTP/1.0" 200 - "-" "WordPress/4.3.1; http://site.com"

    I think the beginning of a scan also runs before this URL is called, so on Wordfence’s Scan page, you might see some messages in the yellow boxes, which may help.

    The auto-update is run directly from a wp-cron job without another http request to the server itself, so you should only see a wp-cron.php request in the access log, like this one:

    "POST /wp-cron.php?doing_wp_cron=1444902646.6493310928344726562500 HTTP/1.0" 200 - "-" "WordPress/4.3.1; http://site.com"

    In the jobs that you saw in the cron viewer, are any of the scheduled dates in the past?

    -Matt R

    Thread Starter allm

    (@realblueorange)

    @wfmattr

    Thanks for getting back to me. It seems the cron entries get a 410 return code.

    Wordfence is working as it should, blocking and throttling etc. Just the auto-scan and auto-update don’t work. I do not see any other irregularities.

    Nothing I added to my htaccess rings a bell. Maybe I should get back to the old one, see if everything works again, and then add things to see if any changes occur. Or do you have another idea?

    In the cronviewer there are some entries from yesterday, but not earlier.

    EDIT: I just checked. The old htaccess makes things work again. The auto-scan and auto-update just finished. I was happy with the old htaccess and just wanted to add some new stuff, but now I will look into the new things I wanted to incorporate and see what is breaking the auto-functions. At least the problem is now over and I have a way of pinpointing where things went wrong.

    Plugin Author WFMattR

    (@wfmattr)

    Ok, great. Have fun with the changes — .htaccess can be tricky sometimes, but can do some interesting things!

    -Matt R

    Thread Starter allm

    (@realblueorange)

    Hi WFMattR,

    Thanks a lot for your support. htaccess can indeed be tricky. I’ve got one that is quite extensive, but probably I made some tiny mistake in new additions. At least everything is OK now and I am now able to find what changes I need to make in the new additions.

    If anything comes up that is interesting for other people I’ll report it here.

    Thanks for providing such great support in this forum. Really appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘no auto-update, no auto-run scan’ is closed to new replies.