简体   繁体   English

WP Crontrol:在您的站点上产生对 WP-Cron 系统的调用时出现问题

[英]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"升级我的 digitalocean 服务器后,Wp crontrol 抛出错误“在您的站点上产生对 WP-Cron 系统的调用时出现问题。这意味着您站点上的 WP-Cron 事件可能无法正常工作。问题是:意外的 HTTP 响应代码: 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).甚至尝试重新安装 wordpress 并使用 define('DISABLE_WP_CRON', true)。 But no use,但是没用,

Let me know how to fix wp crontrol error让我知道如何修复 wp crontrol 错误

I ran into a similar problem but received Unexpected HTTP response code: 400 .我遇到了类似的问题,但收到了Unexpected HTTP response code: 400

After adding define('DISABLE_WP_CRON', true);添加define('DISABLE_WP_CRON', true); to wp-config.php file, you must manually execute wp-cron.php using the system cron.对于wp-config.php文件,你必须使用系统 cron 手动执行wp-cron.php

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.如果您想创建一个真正的 Cron 作业,首先您需要禁用 WP Cron,因此不会在每次有人加载您的页面时执行。 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:要禁用它,请打开主 WordPress 文件夹中的 wp-config.php 文件,并在“/* 就是这样,停止编辑。快乐博客:*/”行之前添加以下行:

define('DISABLE_WP_CRON', true);定义('DISABLE_WP_CRON',真);

Add a Cron job entry through your web hosting control panel.通过您的 web 主机控制面板添加 Cron 作业条目。 You can set the job to run every 5 or 10 minutes.您可以将作业设置为每 5 或 10 分钟运行一次。 Please remember to replace yourdomain.com with your actual domain:请记住将 yourdomain.com 替换为您的实际域:

wget -q -O - http://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 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.每台服务器都有不同的添加 Cron 作业的方法,因此如果您不确定如何操作,可以请您的托管服务提供商帮助您。 You can check this short video if you are using如果您正在使用,您可以查看此短视频

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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