Knowledgebase

Setting Up Cron for WooCommerce Print

  • woocommerceonlinestores, woocommerce, cron, wordpress, php, email, cpanel, wpcron, domainrenewal, firewall
  • 0

This one is specific to our servers and matters more for shops than for anything else.

WHY IT MATTERS

WooCommerce runs a great deal through scheduled actions: order status changes, stock adjustments, emails, subscription renewals, abandoned cart triggers and cleanup.

HTTP requests to /wp-cron.php are blocked across our servers, because WordPress triggers cron on every page load and that generates enormous unnecessary load. Without a real cron job, none of the above runs.

Symptoms are confusing: orders stuck on processing, confirmation emails never sent, stock not decreasing.

THE SETUP

  1. Edit public_html/wp-config.php and add above the "stop editing" line:
define('DISABLE_WP_CRON', true);
  1. cPanel > Cron Jobs. Set the interval to every five minutes, and enter:
/usr/local/bin/php -q /home/USERNAME/public_html/wp-cron.php >/dev/null 2>&1

Replace USERNAME with your cPanel username.

WHY FIVE MINUTES FOR A SHOP

Fifteen is fine for a blog. A shop wants order emails sent promptly, and five minutes is the practical balance.

CHECKING

WooCommerce > Status > Scheduled Actions. Pending actions should clear rather than accumulating.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot