admin管理员组

文章数量:1289529

I have a Dev server and a Production server for my website. Two separate servers, with their own IPs.

WP-cron does not ever spawn on the Production server - if I search the Apache access / request logs, and grep for "wp-cron", I can see that it is never called. However, if I search those same logs on the Dev server, I see that "POST /wp-cron.php?doing_wp_cron=......" line every other minute (so likely on the normal timetable for a wp-cron spawn on an active website), and almost all are being requested by my Production server's IP address.

I've searched everywhere on my Production server for some reference to the Dev server that might be causing this, but I can't find anything. The Production server was essentially cloned from the Dev server years ago when it was set up.

Anyone have an idea about what I might be missing?

I have a Dev server and a Production server for my website. Two separate servers, with their own IPs.

WP-cron does not ever spawn on the Production server - if I search the Apache access / request logs, and grep for "wp-cron", I can see that it is never called. However, if I search those same logs on the Dev server, I see that "POST /wp-cron.php?doing_wp_cron=......" line every other minute (so likely on the normal timetable for a wp-cron spawn on an active website), and almost all are being requested by my Production server's IP address.

I've searched everywhere on my Production server for some reference to the Dev server that might be causing this, but I can't find anything. The Production server was essentially cloned from the Dev server years ago when it was set up.

Anyone have an idea about what I might be missing?

Share Improve this question asked Jul 7, 2021 at 17:25 thecommish3thecommish3 11 bronze badge 2
  • Are any issues flagged in Tools > Site Health? – Jacob Peattie Commented Jul 7, 2021 at 17:27
  • 1 The theory that the dev server is calling cron on the production server is extremely unlikely. What you're likely seeing is WP requests on the dev server making non-blocking requests to itself to trigger cron which is the standard wp cron mechanism and perfectly normal. It's far more likely that WP Cron has been disabled in production – Tom J Nowell Commented Jul 7, 2021 at 17:57
Add a comment  | 

1 Answer 1

Reset to default 0

Might be your production server still uses the site url of the dev server? Check your production database for dev url's. In any case, use the WP_SITEURL and WP_HOME defines

本文标签: WPCron called by separate server