Tag Archives: WP-Cron

‘The Loopback Request to Your Site Failed’: What It Breaks in WooCommerce and How to Fix It

Open Tools → Site Health on many WordPress sites and you’ll find one of these:

  • “The loopback request to your site failed, this means features relying on them are not currently working as expected.”
  • “A scheduled event has failed” or “A scheduled event is late”
  • “The REST API encountered an error”

Most site owners shrug and move on, because the site looks fine.

On a WooCommerce store, that’s a mistake. Loopback requests and scheduled events are how WordPress and WooCommerce run background work: order emails, subscription renewals, stock updates, analytics imports, webhook deliveries, cleanup jobs. When loopbacks fail, that work can silently stop. Your storefront keeps working while the machinery behind it stalls.

This guide explains what a loopback request is, what fails in WooCommerce when it doesn’t work, the common causes, and how to fix it properly.

What a “loopback request” is

Diagram: the server running WordPress sends a loopback request to its own site's wp-cron.php, which runs background jobs. Common blockers: a firewall blocking the server's own IP, basic auth, DNS or SSL problems on the server, a slow plugin causing timeouts, and DISABLE_WP_CRON without a server cron.

A loopback request is your website making an HTTP request to itself: WordPress on your server calling https://yourstore.com/wp-cron.php (or another URL on your own site) over the network.

WordPress uses this to run tasks in the background, without making a visitor wait. When a page loads, WordPress checks whether any scheduled tasks are due. If they are, it fires a quick loopback request to wp-cron.php, which runs those tasks in a separate process.

WooCommerce builds on this with Action Scheduler, a queue for background jobs. Action Scheduler is triggered by WP-Cron and also uses asynchronous requests to keep the queue moving.

So if your site can’t reach itself, or WP-Cron is switched off without a replacement, background work doesn’t run.

What breaks in WooCommerce when loopbacks fail

Six WooCommerce features that rely on background jobs: order processing, customer emails, subscription renewals, analytics, outgoing webhooks to other systems, and scheduled sales. The tell-tale sign of a problem is hundreds of past-due scheduled actions.

Background job What you notice
Deferred or queued order processing Orders stuck mid-flow; some payment confirmations processed late
Transactional emails that depend on queued work Customers don’t get confirmations promptly (guide)
Subscription renewals Renewals not created or not charged on time (guide)
Analytics imports WooCommerce Analytics looks empty or out of date
Outgoing webhooks to other systems ERP, fulfilment or CRM integrations stop receiving orders
Scheduled sales and coupon expiry Sales don’t start or end on time
Unpaid order cancellation and cleanup Timers don’t run on schedule

In WooCommerce → Status → Scheduled Actions, the tell-tale sign is a Pending tab full of actions whose scheduled time has already passed: hundreds of past-due actions.

The common causes

1. Firewalls and security plugins blocking your own server

Your server calling itself can look like an attack: a request from a data-centre IP (your own) with no browser. Host firewalls, security plugins and CDN bot protection sometimes block it. Ironically, the same rules often block payment webhooks too. (Firewall blocking webhooks)

2. Password protection or basic auth

Staging sites are often protected with HTTP basic authentication. If that protection is left on a live site, or the site was pushed live from staging with it, every loopback request gets a 401.

3. DNS and SSL problems on the server

The server must resolve your domain and complete an HTTPS connection to itself. A mis-set hosts file, a domain pointing elsewhere (behind a CDN or during a migration), or an SSL certificate the server doesn’t trust produces timeouts or “cURL error 28” messages.

4. A plugin slowing every request

Site Health gives loopback requests around 10 seconds. A plugin that makes every request slow (heavy session handling, external API calls on every page) can make loopbacks time out. A WordPress.org thread traced loopback and REST API timeouts on a WooCommerce site to one plugin’s session handling. Changing its settings resolved it.

5. DISABLE_WP_CRON without a replacement

Many hosts and performance guides set define( 'DISABLE_WP_CRON', true ); in wp-config.php to stop WP-Cron running on page loads. That’s good practice, as long as a real server cron job runs WP-Cron instead. If nobody set up that server cron (common after a migration), scheduled work simply never runs, and no error appears anywhere.

6. Very low traffic

WP-Cron triggers on visits. On a quiet store, hours can pass with no visitors, so nothing runs. Not a failure as such, but it makes background work slow and unpredictable.

How to diagnose

  1. Site Health: Tools → Site Health → Status. Note any loopback, REST API or scheduled event errors and the exact message (401, 403, timeout, cURL error).
  2. Scheduled Actions: WooCommerce → Status → Scheduled Actions → Pending. How many are past due? Check the Failed tab too, and open one to see the error.
  3. wp-config.php: is DISABLE_WP_CRON set to true? If so, ask your host whether a server cron job runs wp-cron.php.
  4. WP-CLI (if available): wp cron test checks whether WP-Cron can spawn; wp cron event list shows overdue events.
  5. Security logs: check your security plugin, CDN and host firewall for blocked requests from your own server’s IP to wp-cron.php.

How to fix it

Set up a real server cron (recommended for every store). In your hosting control panel, add a cron job that runs every few minutes:

*/5 * * * * wget -q -O - "https://yourstore.com/wp-cron.php?doing_wp_cron" >/dev/null 2>&1

or, with WP-CLI:

*/5 * * * * cd /path/to/site && wp cron event run --due-now >/dev/null 2>&1

Then set DISABLE_WP_CRON to true so visitors don’t also trigger it.

Allow your server to reach itself. Allowlist your own server IP in your security plugin and host firewall, and exempt wp-cron.php and admin-ajax.php from bot challenges.

Remove basic auth from production, or exempt your server’s own requests from it.

Fix DNS/SSL on the server with your host: the server should resolve your domain to itself and trust the certificate.

Find slow plugins with a conflict test on staging if loopbacks time out.

Let the backlog drain. Don’t delete past-due actions. They can include real customer emails and renewals. Once the cause is fixed, they’ll run. On very large backlogs, ask your host for help, or run wp action-scheduler run in batches.

Then sweep up. Check whether any customers missed confirmation emails or renewals during the stall.

A worked example: the migration nobody finished

A store moves to a faster host. The migration service copies wp-config.php, including define( 'DISABLE_WP_CRON', true );, which the old host required because it ran a server cron job. Nobody sets up a cron job on the new host.

  • Day 1: everything looks great. The site is faster.
  • Day 2: WooCommerce Analytics stops showing new orders. “Probably a caching thing.”
  • Day 4: a subscriber emails to say their renewal didn’t charge (they’re pleased, the owner isn’t).
  • Day 6: the fulfilment integration hasn’t received orders since day 1. The warehouse has been working from the admin screen.
  • Day 7: someone opens Scheduled Actions: 4,800 past-due actions.

Site Health had been showing “A scheduled event is late” since day 1. Nobody looked.

The fix was a single cron job in the hosting panel. The cleanup took two days: replaying renewals carefully, checking which customers missed emails, and reconciling the fulfilment system.

Hosting-specific notes

  • Managed WordPress hosts often disable WP-Cron and run their own cron. Confirm it’s running for your site, and how often.
  • Shared hosting may limit cron frequency (for example, no more than every 15 minutes). That’s usually fine for WP-Cron, but tell your host if you have heavy subscription or email volume.
  • Behind a CDN or proxy, your server may need to reach itself directly rather than through the CDN. Ask your host to make sure loopback requests don’t leave the server.
  • Staging sites cloned from production may run scheduled tasks (emails, renewals) against real customers. Disable outgoing email and payment processing on staging.

Watching it with Ordafide

The worst thing about loopback failures is that they’re silent and slow-burning. Site Health shows a warning once, and nobody looks at Site Health. The backlog grows by the hour.

Ordafide Order Integrity for WooCommerce (free) puts this front and centre on its Store health screen:

  • Background job queue health: how far behind Action Scheduler is, how many jobs failed, and the most likely cause in plain language rather than queue jargon.
  • WordPress scheduler status, including whether DISABLE_WP_CRON is set.
  • A loopback test you can run with one click. It asks your site to call its own wp-cron.php, contacts no other service, and runs only when you press the button.
  • An order email delivery log, so you can see exactly which customers missed their emails during a stall, with one-click resend.
  • The Customer never emailed check, which flags paid orders with no confirmation sent.

An optional weekly summary email tells you when there’s something to fix. For agencies, wp ordafide health reports the same from the command line.

Ordafide Pro adds real-time alerts (Slack, SMS, email, signed webhook) so a stalled queue reaches you within the hour, and a signed heartbeat endpoint an external monitor can poll to confirm the store’s own checks are still running, which matters when the scheduler itself is the thing that broke.

How often should WP-Cron run?

For most stores, every 5 minutes is a sensible default. Busier stores, or those with lots of subscriptions and integrations, often run it every minute. Very quiet stores can get away with 15 minutes, but emails and renewals will be less punctual. Whatever you choose, make sure it’s one cron job, not several competing ones, and that visitor-triggered WP-Cron is disabled so the two don’t overlap.

What not to do

  • Don’t install a “WP-Cron fixer” plugin on top of a broken setup without understanding the cause. Several overlapping cron triggers can run jobs twice, and for subscriptions that means double charges.
  • Don’t delete Action Scheduler tables to “clean up”. They hold real pending work.
  • Don’t ignore Site Health warnings because the site “looks fine”. On a store, background work is where the problems hide.
  • Don’t disable the firewall to get loopbacks working. Make a narrow exception for your own server.
WooCommerce Order Emails Not Sending? Check Action Scheduler, WP-Cron and SMTP

WooCommerce Order Emails Not Sending? Check Action Scheduler, WP-Cron and SMTP

When WooCommerce order emails stop arriving, the store looks perfectly healthy. Orders come in. The dashboard loads. There’s no error message anywhere.

The only symptom is your inbox filling up with “Did my order go through?” messages, and sometimes chargebacks from customers who assumed they’d been scammed.

This guide walks through the causes in the order you should check them, from the quick settings mistakes to the silent background-queue failures that catch out even experienced developers.

First: is it one email, one customer, or everything?

Symptom to cause guide: one customer missing an email points to a typo or spam; one email type stopped points to it being disabled in settings; nothing sending since a migration points to missing SMTP; late or burst emails point to a stalled Action Scheduler or WP-Cron; admin emails arriving but not customer emails points to disabled customer emails or a plugin conflict.

The pattern tells you where to look:

Symptom Most likely cause
One customer didn’t get their email Typo in their address, or it went to spam
One email type stopped (e.g. Completed order) That email was disabled in settings
No emails at all, from the moment you migrated Mail sending is broken (no SMTP)
Emails arrive hours late, or in bursts Background queue (Action Scheduler / WP-Cron) is stalled
Admin emails arrive but customer emails don’t Customer emails disabled, or a recipient/plugin issue

Step 1: Check the email settings

Go to WooCommerce → Settings → Emails. Every email (Processing order, Completed order, Customer invoice, New order and so on) has its own enable toggle. Plugins, staging tools and well-meaning colleagues sometimes switch these off.

While you’re there, check the “From” address. If it uses a domain your mail service isn’t authorized to send for, receiving servers may reject or junk the message.

Step 2: Check that WordPress can send email at all

By default, WordPress sends mail with PHP’s `mail()` function. Many hosts restrict it, and messages sent this way often fail SPF/DKIM checks and land in spam, or are silently discarded with no error.

The fix is to send through a proper mail provider over SMTP or an API using an SMTP plugin, and to set up SPF, DKIM and DMARC records for your sending domain. Then send a test email from the SMTP plugin.

If test emails work but order emails still don’t, keep going. The problem is upstream of the mail server.

Step 3: Check the background queue (the silent killer)

Diagram of the chain behind a WooCommerce order email: a visitor or server cron triggers WP-Cron, which runs Action Scheduler, which processes order updates, which send email through SMTP to the customer's inbox. Common break points: DISABLE_WP_CRON without a server cron, blocked loopback requests, a backlog of past-due actions, and PHP mail without SMTP.

WooCommerce relies on Action Scheduler, a background job queue, for a lot of order-related work, and some payment gateways hand parts of their payment confirmation to it. Action Scheduler is triggered by WP-Cron. And WP-Cron, by default, only runs when someone visits your site.

When this chain breaks, work queues up and doesn’t run. Order status changes that depend on queued work don’t happen, so the emails tied to those status changes don’t send either. There is no error and nothing on screen changes.

How to check

Go to WooCommerce → Status → Scheduled Actions and open the Pending tab.

  • A handful of actions scheduled in the future is normal.
  • Dozens or hundreds of actions that are past due means nothing is running the queue.
  • A large number in the Failed tab means jobs are running but crashing. Open one to see the error.

Common reasons the queue stops

  • DISABLE_WP_CRON’ is set to ‘true’ in ‘wp-config.php’, usually by a host or performance plugin, but no real server cron job was set up to replace it.
  • Loopback requests are blocked. WP-Cron works by your site making an HTTP request to itself. A firewall, basic-auth password, or DNS issue that blocks this kills the scheduler. `Tools → Site Health` reports loopback failures.
  • Low traffic. On a quiet store, if no one visits, WP-Cron doesn’t run.
  • A huge backlog. On busy stores the Action Scheduler tables can grow to hundreds of thousands of rows, and the queue can’t keep up.
  • A fatal error in one job that keeps failing and retrying.

How to fix it

1. Set up a real cron job on your server (most hosts offer this in the control panel) to run WP-Cron every few minutes, for example:
‘*/5 * * * * wget -q -O – “https://yourstore.com/wp-cron.php?doing_wp_cron” >/dev/null 2>&1’
or, with WP-CLI: ‘wp cron event run –due-now’
2. Then disable visitor-triggered cron with ‘define( ‘DISABLE_WP_CRON’, true );’ so the two don’t compete.
3. Clear the backlog by running it, not deleting it. Pending actions may include real customer emails and order updates. With WP-CLI you can run ‘wp action-scheduler run’. On very large backlogs, ask your host for help.
4. Fix loopback if Site Health reports it failing: whitelist your own server IP in the firewall, or remove basic-auth from production.
5. Investigate failed actions and fix the plugin causing them.

Step 4: Resend the emails customers missed

Once the cause is fixed, the emails that never went out won’t magically send themselves. For each affected order, open it, choose Order actions → Email invoice / order details to customer (or Resend new order notification for the admin copy), and update.

The hard part is working out which orders were affected. WooCommerce doesn’t give you an easy per-order record of whether each customer email was actually handed to your mail server.

Watching this automatically

Ordafide Order Integrity for WooCommerce is a free plugin that watches the two things that make everything else fail at once:

  • Background job queue health: how far behind Action Scheduler is, how many jobs failed, and the most likely cause in plain language, plus the WordPress scheduler’s status.
  • Order email delivery: every WooCommerce email recorded against its order, with the result the mail server returned, and a one-click resend.

Its Customer never emailed check flags paid orders where no customer email reached your mail server, or where every attempt was rejected. A loopback test checks whether your site can call itself (it only calls your own site, and only when you press the button), and an optional weekly summary email tells you when there’s something to look at.

Resending is one of only two repairs the plugin can make, and every resend is written to an activity log. Ordafide sends no data to third parties and has no account or licence key.

If you’d rather be alerted the moment the queue stalls instead of finding out in a weekly summary, Ordafide Pro adds Slack, SMS, email and webhook alerts, plus synthetic checkout monitoring every 15 minutes.

Quick checklist

  • Every needed email is enabled in WooCommerce → Settings → Emails
  • Mail goes through SMTP or an email API, with SPF/DKIM/DMARC set up
  • No pile of past-due actions in Scheduled Actions
  • A real server cron runs WP-Cron if `DISABLE_WP_CRON` is set
  • Site Health shows loopback requests working
  • Affected customers have had their emails resent