Skip to content
  • Quick Ref
  • Contact
  • About
wpcanyon.com

wpcanyon.com

WP-Cron not running: setup a real cron on cPanel & Plesk

Posted on August 19, 2025 By Admin No Comments on WP-Cron not running: setup a real cron on cPanel & Plesk

WP-Cron not running: setup a real cron on cPanel & Plesk

WordPress relies on WP-Cron to handle scheduled tasks like publishing scheduled posts, checking for updates, and sending email notifications. However, WP-Cron depends on site traffic to trigger these tasks, which can cause delays or failures on low-traffic sites. The quick fix is to disable WP-Cron’s default behavior and set up a real server cron job via cPanel or Plesk to run WP-Cron reliably.

Quick Fix

  1. Disable WP-Cron’s automatic execution by adding define('DISABLE_WP_CRON', true); to wp-config.php.
  2. Create a cron job in cPanel or Plesk to run the WP-Cron PHP script every 5 or 10 minutes.
  3. Verify the cron job runs successfully and scheduled tasks execute on time.

Why this happens

By default, WP-Cron runs when someone visits your WordPress site. If your site has low or irregular traffic, scheduled tasks may not run on time or at all. This can affect publishing scheduled posts, plugin updates, backups, and other time-sensitive operations. Using a real server cron job ensures WP-Cron runs at fixed intervals regardless of site traffic.

Step-by-step: Setup a real cron on cPanel & Plesk

1. Disable WP-Cron automatic execution

Edit your WordPress wp-config.php file located in the root directory of your WordPress installation. Add the following line above the /* That's all, stop editing! Happy blogging. */ comment:

define('DISABLE_WP_CRON', true);

This prevents WP-Cron from running on every page load.

2. Find the correct PHP executable path

You need to know the path to the PHP binary on your server. Common paths include:

  • /usr/bin/php
  • /usr/local/bin/php
  • /opt/cpanel/ea-php74/root/usr/bin/php (for cPanel with EasyApache 4)

If unsure, contact your hosting provider or run which php via SSH.

3. Create the cron job in cPanel

  1. Log in to your cPanel dashboard.
  2. Navigate to Cron Jobs under the Advanced section.
  3. Under Add New Cron Job, select the interval (e.g., every 5 minutes: */5 * * * *).
  4. In the command field, enter the following command, replacing /path/to/php and /home/username/public_html with your server’s PHP path and WordPress root directory:
/path/to/php /home/username/public_html/wp-cron.php > /dev/null 2>&1

The > /dev/null 2>&1 part discards output to avoid email spam.

  1. Click Add New Cron Job to save.

4. Create the cron job in Plesk

  1. Log in to your Plesk control panel.
  2. Go to Tools & Settings > Scheduled Tasks.
  3. Click Add Task.
  4. Set the task type to Run a command.
  5. Set the schedule (e.g., every 5 minutes).
  6. Enter the command, replacing paths accordingly:
/path/to/php /var/www/vhosts/example.com/httpdocs/wp-cron.php > /dev/null 2>&1
  1. Save the task.

5. Verify the cron job runs

Check your scheduled posts or plugin tasks to confirm they execute on time. You can also check cron logs or enable debugging in WordPress to monitor WP-Cron activity.

Works on

Environment Supported
cPanel (with EasyApache 4) Yes
Plesk Onyx and later Yes
Apache Web Server Yes
Nginx Web Server Yes
LiteSpeed Web Server Yes

FAQ

  • Q: Can I set the cron job to run less frequently than every 5 minutes?

    A: Yes, you can adjust the interval to every 10, 15, or 30 minutes depending on your needs. However, running every 5 minutes is recommended for timely task execution.

  • Q: What if I don’t have SSH access to find the PHP path?

    A: Contact your hosting provider for the correct PHP binary path or check your hosting documentation. Many hosts provide this information in the control panel.

  • Q: Will disabling WP-Cron affect my site negatively?

    A: No, disabling WP-Cron’s automatic execution only stops it from running on page loads. The real cron job you set up will run WP-Cron reliably instead.

  • Q: How do I troubleshoot if the cron job doesn’t seem to run?

    A: Check the cron job logs, verify PHP path and permissions, and ensure the command syntax is correct. Also, confirm DISABLE_WP_CRON is set properly in wp-config.php.

  • Q: Can I use a plugin to manage WP-Cron instead?

    A: Some plugins help monitor or trigger WP-Cron, but they still rely on traffic or server cron jobs. Setting up a real cron job is the most reliable method.

Automation Tags:Cron;Automation;cPanel;Plesk

Post navigation

Previous Post: cURL error 60: SSL certificate problem in WordPress
Next Post: WooCommerce: Force NZD & hide other currencies

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Top WordPress Themes for Blogs in 2025
  • WordPress Admin Panel Trick: Adding ID Field to the Posts Listing
  • Solution previous_posts_link and next_posts_link Not Working
  • Show Top Commentators in WordPress Without a Plugin
  • How to Style Admin Comments in WordPress

Recent Comments

    Archives

    • August 2025

    Categories

    • Admin & Blocks
    • Admin & UI
    • Automation
    • Automation & Plugins
    • Comments
    • Comparisons
    • Database & Revisions
    • Developer Snippets
    • Fixes & Errors
    • Media & Thumbnails
    • Queries & Pagination
    • Security
    • Speed & Security
    • Tips & Tricks
    • WooCommerce How‑tos
    • WordPress Snippets
    • WordPress Themes
    • Terms & Conditions
    • Affiliate Disclosure

    Copyright © 2025 wpcanyon.com.

    Powered by PressBook WordPress theme

    Also by the maker of MySurveyReviews.com