简体   繁体   中英

WP Crontrol: There was a problem spawning a call to the WP-Cron system on your site

After upgrading my digitalocean server, Wp crontrol is throwing error "There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron events on your site may not work. The problem was: Unexpected HTTP response code: 500"

I checked online but not able to find solution.

Server : Cyberpanel Openlitespeed
PHP version: 7.4
Wordpress version :5.5.1

Even tried to reinstall wordpress and used define('DISABLE_WP_CRON', true). But no use,

Let me know how to fix wp crontrol error

I ran into a similar problem but received Unexpected HTTP response code: 400 .

After adding define('DISABLE_WP_CRON', true); to wp-config.php file, you must manually execute wp-cron.php using the system cron.

RESULT: Works perfectly now.

If you want to create a real Cron job, first you need to disable WP Cron, so is not executed every time someone loads one of your pages. To disable it, open the wp-config.php file in your main WordPress folder and add the following line before the "/* That's all, stop editing. Happy blogging: */" line:

define('DISABLE_WP_CRON', true);

Add a Cron job entry through your web hosting control panel. You can set the job to run every 5 or 10 minutes. Please remember to replace yourdomain.com with your actual domain:

wget -q -O - http://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Each server has different ways of adding a Cron job, so if you are not sure how to do it you can ask your hosting provider to help you. You can check this short video if you are using

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM