Cpanel php -q Cron Task blocked by BPS

Home Forums BulletProof Security Free Cpanel php -q Cron Task blocked by BPS

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
  • #37170

    Hi there!

    We have to configure 2 cron tasks at Cpanel, for WP All Import Plugin, but BPS is blocking the execution with a 403 error.

    The task are this (i´ve have imputed X at directories and licence key)

    php -q /home/xxxxxxxxx/xxxxxxxxx/wp-cron.php?import_key=xxxxxxxxx&import_id=3&action=trigger >/dev/null 2>&1
    php -q /home/xxxxxxxxx/xxxxxxxxx/wp-cron.php?import_key=xxxxxxxxx&import_id=3&action=processing >/dev/null 2>&1

    After deactivating the BPS plugin, plus the .htaccess, they runned well.

    Could you please update us with any steps to follow, for having BPS and .htaccess file activated and Crons running well?

    Thanks in advance for your time and support 😉


    Hi, we have unactivated the BPS plugin and the .htaccess file, as after running the BPS wizzard option didn´t solve the problem with this cron task being blocked by an 403 error message. After doing this, crons runned well, this is why we are asking for help to solve the situation, as we need to have both your BPS plugin activated & .htaccess file, plus cron task running well. Thank you!

    AITpro Admin

    Activate the BPS plugin > go to the Security Log page > copy the Security Log entry that shows what is being blocked in your cron and post it in your forum reply.  The BPS plugin has built-in Standard BPS troubleshooting steps > so that you do not need to deactivate the BPS plugin for troubleshooting and can accurately isolate exactly which BPS plugin feature is causing an issue/problem.


    Hi and really thanks for answering, here is the log:

    [403 GET Request: jueves 18 abril 2019 - 4:36 PM]
    BPS: 3.4
    WP: 5.1.1
    Event Code: PSBR-HPRA
    Host Name:
    REQUEST_URI: /wp-content/plugins/bulletproof-security/403.php
    HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

    Hi againg, from our hosting company, that are trying to help, executed the cron tasks from SSH and got this error:

    root@server4 [~]# wget
    [1] 3417853
    [2] 3417854
    root@server4 [~]# --2019-05-02 10:26:53--
    Connecting to||:443... connected.
    HTTP request sent, awaiting response... 403 Forbidden
    2019-05-02 10:26:53 ERROR 403: Forbidden.
    [1]- Exit 8 wget
    [2]+ Done import_id=3
    root@server4 [~]#

    AND, this is the ones we are trying to execute at Cpanel and that are giving that executing error:

    php -q /home/xxxxxxxxx/ >/dev/null 2>&1
    php -q /home/xxxxxxxxx/ >/dev/null 2>&1
    AITpro Admin

    The wget cron is being blocked by a security rule in the BPS root htaccess file.  The solution is here > Your cron is using the PHP command-line interpreter and I don’t see anything in your Security Log entries that tells me why it is being blocked.  See if doing the fix in the link above gets your php cron working or not.  If it still does not work then do the troubleshooting step below to confirm that something in the BPS root htaccess file code is causing the block.

    Do this troubleshooting step > 1. On the Security Modes page, click the Root Folder BulletProof Mode Deactivate button.  Test your cron and let me know if it works.


    Hi and thanks for the patience. I´ve tryed both, but none makes the cron task work. Still says you don´t have permissions, error 403. I can´t underestand why this happens. I can´t think of other plugin that is blocking…. Any other possible idea? Thanks for your time 😉

    AITpro Admin

    Do this troubleshooting step > 1. On the Security Modes page, click the Root Folder BulletProof Mode Deactivate button.  Test your cron and let me know if it works.

    I don’t see any security rules in the BPS root htaccess file that would block your php cron.  Have you added any custom code in BPS Custom Code?  Copy your root htaccess file contents and post your BPS root htaccess file in your forum reply.


    Yes, I proceeded with your instructions, 1st placed the code updated for wget where you told us at custom code (as we did with other in the past) and didn´t work. Then deactivated the root .htaccess, but didn´t work either.

    Here is our .htaccess file:

    [htaccess code copied and then deleted by AITpro Admin]

    Thank you for all this time dedicated!

    AITpro Admin

    hmm maybe this problem is not being caused by BPS then.  Do this additional BPS troubleshooting step > 2. On the Security Modes page, click the wp-admin Folder BulletProof Mode Deactivate button. See Custom Code Note if doing this step works. If deactivating both BPS root and wp-admin htaccess files does not allow your cron to work then either there is another htaccess file somewhere else under your hosting account that is blocking your cron or Wordfence or Mod Security or something else on your host server or in another plugin you have installed is blocking your cron.


    Thanks, about where you wrote Custom Code Note, what do you mean? For doing thing well following your estrict instructions :9

    AITpro Admin

    Disregard the “Custom Code Note”.  I have already eliminated that possibility by checking your root htaccess file code you posted.  Your root htaccess file code contains Wordfence htaccess code.  So it appears that you have the Wordfence plugin installed.  Wordfence is known to block direct crons.  See this Wordfence forum topic with the solution >


    GREAT! I’ve read your shared wp post and we are going to try that 🙂

    I never imagined that Wordfence could block this type of things.

    I shall write back in a pair of days or before, to let you know for future other BPS member doubts.

    Really thanks a lot for taking all this time to help us, you did too much for us.

    We LOVE your plugin and is always with us!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.