# How to disable wp-cron.php and set a real cron job in cPanel

> WordPress runs scheduled tasks using wp-cron.php, which fires on every page load by default. Replacing it with a real server cron job means tasks run on a fixed schedule, independently of visitor traffic. This guide covers both the quick way using WP Toolkit and the manual approach.

Source: https://www.kualo.com/knowledgebase/wp-security/how-to-disable-the-wordpress-wp-cronphp-and-set-it-as-a-real-cron-job-within-cpanel
Updated: 2026-06-09

---

WordPress runs periodic maintenance tasks - such as publishing scheduled posts, sending emails, and running plugin routines - using a built-in script called **wp-cron.php**. By default this script fires on every page load, which can slow your site down if a heavy task happens to trigger mid-request. Replacing it with a real server cron job means tasks run on a fixed schedule, completely independently of visitor traffic.

## The quick way: use WP Toolkit

The easiest approach is to let WP Toolkit handle everything for you.

1. Log in to cPanel and open **WordPress Management** on the left side.
2. Locate your WordPress installation in the list and click into it.
3. On the Dashboard tab, under Performance, locate **Take over wp-cron.php** and toggle this to **On**.

![](https://kb-cdn.kualo.com/a3/e5/a3e58c0199a0eedbb617ec6d57966f8b7ffa5871.jpg)

WP Toolkit will add `DISABLE_WP_CRON` to your `wp-config.php` and create a cPanel cron job that runs the WordPress cron twice per hour automatically.

## The manual way

If you prefer to configure this yourself, follow the two steps below.

### Step 1 - disable wp-cron in wp-config.php

1. Log in to cPanel and open **File Manager**.

   ![File Manager in cPanel](https://kb-cdn.kualo.com/1b/03/1b0371811a57143a085b568e0701b3cacf82f5d0.png)

2. Navigate to the document root folder for your WordPress site.

   ![Opening the document root](https://kb-cdn.kualo.com/f0/b1/f0b1a064f704b2b3ef3e7e2a5d23de6d92ed71b1.png)

3. Right-click **wp-config.php** and select **Edit**.

   ![Editing wp-config.php](https://kb-cdn.kualo.com/52/38/52386fba7fb79357b565f8b61f9b6d5a3844ac27.png)

4. Immediately after the opening `<?php` tag, add the following line:

   ```php
   define('DISABLE_WP_CRON', true);
   ```

   ![DISABLE_WP_CRON added to wp-config.php](https://kb-cdn.kualo.com/26/1f/261f92280591a2238f86f2d13cb56dbbaff81c2e.png)

5. Click **Save Changes**.

### Step 2 - add a cron job in cPanel

1. In cPanel, open **Cron Jobs**.

   ![Cron Jobs in cPanel](https://kb-cdn.kualo.com/7a/e1/7ae158fbdf9a3ca0961c3d8192da78384f3de5a5.png)

   :::tip
   Make a note of your cPanel username - you will need it in the command below. It is shown in the **Stats** panel on the cPanel home screen.
   :::

2. Scroll to **Add New Cron Job**. Under **Common Settings**, choose **Once Per Hour**.

   ![Setting the cron frequency to once per hour](https://kb-cdn.kualo.com/80/d5/80d52a42a27d85a21621997c31683ae9f8629097.png)

3. In the **Command** field, enter:

   ```bash
   /usr/bin/php /home/USERNAME/public_html/wp-cron.php >/dev/null 2>&1
   ```

   Replace `USERNAME` with your cPanel username and `public_html` with your site's document root if it differs.

4. Click **Add New Cron Job**.

   ![Adding the new cron job](https://kb-cdn.kualo.com/54/c1/54c1ea2d7cb7ddfb37e117fa4fb8ee08c8403cc9.png)

## Multiple WordPress sites on the same account

If you host several WordPress sites under one cPanel account, stagger the cron jobs so they do not all run at the same minute. For example:

| Site | Minute | Hour |
|------|--------|------|
| Site 1 | 5 | * |
| Site 2 | 10 | * |
| Site 3 | 15 | * |
| Site 4 | 20 | * |

Each site's cron will then run once per hour, offset by five minutes from the next.

![Sequential cron jobs for multiple sites](https://kb-cdn.kualo.com/1b/4e/1b4e7d0a37eaf9cfae90f65ae00fd216329bf130.png)

For more detail on cron jobs in cPanel, see [How to set up a cron job in cPanel](/knowledgebase/cpanel-how-tos/how-to-setup-a-cron-job-in-cpanel).

If you need any help setting this up, open a support ticket from within your Kualo client area.

---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/wp-security/how-to-disable-the-wordpress-wp-cronphp-and-set-it-as-a-real-cron-job-within-cpanel · © Kualo Ltd._
