WordPress normally runs scheduled tasks (WP-Cron) when someone visits the site. On busy sites this wastes resources; on quiet sites tasks may run late. A real server cron job is more reliable.
Step 1: Disable WP-Cron
Edit wp-config.php and add above /* That's all, stop editing! */:
define( 'DISABLE_WP_CRON', true );
Step 2: Add a cron job
- In cPanel, open Cron Jobs in the Advanced section.
- Under Common Settings, choose Once Per Fifteen Minutes (or every 5 minutes for shops).
- In Command, enter (replacing the path with your own):
cd /home/cpuser/public_html && php wp-cron.php >/dev/null 2>&1
- Click Add New Cron Job.
Using php directly avoids web requests and firewall issues. Your home path is shown in cPanel's General Information panel.