最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Getting Error "invalid secret string" by running wp-cron.php manually

programmeradmin0浏览0评论

I am trying to run the wp-cron.php manually by calling it that way:

.php?doing_wp_cron

Disabling the auto cron function with :

define('DISABLE_WP_CRON', TRUE);

produces the same error.

What could be the issue?

I am trying to run the wp-cron.php manually by calling it that way:

http://mysite/wp-cron.php?doing_wp_cron

Disabling the auto cron function with :

define('DISABLE_WP_CRON', TRUE);

produces the same error.

What could be the issue?

Share Improve this question asked Nov 25, 2012 at 14:49 larslars 212 bronze badges 2
  • The question we have to ask upfront: "Why are you calling it manually?". – kaiser Commented Nov 25, 2012 at 16:34
  • Is "invalid secret string" the exact (!) error message? If so, the error isn't caused by WordPress. And what is the parameter "?doing_wp_cron" for? – Ralf912 Commented Nov 25, 2012 at 17:40
Add a comment  | 

3 Answers 3

Reset to default 2

If you're launching wp-cron manually you don't need the "doing_wp_cron" parameter. The fact that you have it and haven't given it a value is very likely to be what's causing your error.

Edit wp-config.php and add the secret key. A good spot is right after the Authentication Unique Keys and Salts. Please be sure to update the secret to be your own.

define( 'WP_CRON_CONTROL_SECRET', 'qUhYNCrdHSHOPwPgrdyY19yi0' );

Then you can run

http://example/wp-cron.php?doing_wp_cron&qUhYNCrdHSHOPwPgrdyY19yi0

Where the part after the & is the secret key which you created with the define statement in wp-config.php

For others with this issue, make sure you don't have a plugin like WP-Cron Control enabled (source).

发布评论

评论列表(0)

  1. 暂无评论