• Resolved JonManness

    (@jonmanness)


    Hi everyone,

    Was wondering if someone could translate this error and an offer a solution.

    Warning: require_once(./wp-load.php): failed to open stream: No such file or directory in /home/[CPANELUSER]/public_html/wp-cron.php on line 26
    
    Fatal error: require_once(): Failed opening required './wp-load.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/[CPANELUSER]/public_html/wp-cron.php on line 26

    Recently disabled wp-cron in the wp-config and set up a cron job to wp-cron.php in CPanel, which is when I saw the output error in CPanel. Don’t think I need wp-cron at the moment for any plugins or scheduling (could be wrong about that), but would like to have it stable and ready just in case.

    Thank you for your help!

    -Jon

Viewing 6 replies - 1 through 6 (of 6 total)
  • It is required, revert back.

    Thread Starter JonManness

    (@jonmanness)

    Wouldn’t this error occur if wp-cron was enabled? Or is the error occurring because I disabled it in the config? Still believe the path where it says “Warning: require_once(./wp-load.php)” needs to be changed, but not completely sure.

    Your functions file is (most likely) requiring it – review the codex for what to do to create a custom cron job- it does not require removing the required one.

    Thread Starter JonManness

    (@jonmanness)

    Ended up removing “./” from require_once(./wp-load.php) in line 26 in wp-cron.php and now there’s no more error. Believe the “./” was making wp-cron look for wp-load in a different directory.

    Hope this helps someone else with a similar error!

    It did – Thanks Jon!

    PJ Brunet

    (@knowingart_com)

    This error can happen when you try to run wp-cron.php from another directory where wp-cron.php can’t find its supporting files

    At least in my case there was nothing to “fix” on line 26.

    Essentially I was trying to run wp-cron.php from a crontab like this:

    php /home/www-data/example.com/wp-cron.php

    My solution was to create a bash script to first change directories and provide me some extra information:

    */10 * * * * root . /etc/wpcron.sh > /dev/null 2>&1

    Full explanation here:

    https://tomakefast.com/when-wp-cron-php-sceduling-fails-3003/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp-load error from wp-cron output in CPanel’ is closed to new replies.