Search
Close this search box.

How to Remove Obsolete Cron Jobs in WordPress

Master the art of managing and removing obsolete Cron Jobs from your WordPress site with our simple guide to improve your site's performance.
Table of Contents

Sponsored Ad

If you purchase through a link on our site, we may earn a commission.

Cron jobs can be a technical subject, but with the nature of WordPress as it is today, it’s a crucial aspect of your WordPress website’s health and something you may have to get involved in from time to time.

Specifically, in this short tutorial, we’re going to discuss how to find and remove obsolete or discontinued cron jobs from your WordPress site.

This guide aims to simplify the process, even if you have no development experience.

First, let’s understand what a Cron Job is.

What Are Cron Jobs?

In WordPress, Cron Jobs are scheduled tasks that your website runs at specific intervals. These tasks include actions like publishing scheduled posts, checking for updates, or sending notifications.

Cron jobs as viewed in the WP Crontrol plugin on a WordPress website.
Cron jobs as viewed in the WP Crontrol plugin on a WordPress website.

However, not all Cron Jobs remain useful forever. Some of them, especially those created by plugins that you no longer use, can become obsolete and clutter your website, potentially slowing it down.

Now that we understand what Cron Jobs are, let’s learn how to find them.

How to Find and See Cron Jobs

To see the Cron Jobs currently running on your WordPress site, you’ll need a plugin like WP Crontrol, Advanced Cron Manager, or any similar plugin that allows you to control and edit the Cron events in your schedule.

WordPress cron plugins in the WordPress plugin repository.
WordPress cron plugins in the WordPress plugin repository.

Here’s a general step-by-step guide on how to do this:

  1. Install and activate your chosen Cron management plugin from your WordPress website’s Plugins page.
  2. After activating the plugin, navigate to the plugin’s section in your WordPress dashboard. For WP Crontrol, for example, you can go to Tools > Cron Events.
  3. You’ll see a list of all the Cron Jobs currently scheduled on your site. They’ll be listed with details like hook names, schedules, and the next run time.

It’s crucial to mention that you should be cautious when dealing with Cron Jobs. Accidentally deleting or modifying an essential Cron Job can lead to unexpected behavior on your website.

If you’re not confident making these changes, it’s best to either speak to your hosting provider or reach out to a developer for help.

How to Remove Obsolete Cron Jobs

The process of removing obsolete Cron Jobs is not complicated, but it should be done with care.

Here’s a step-by-step guide on how to do this:

  1. Identify the obsolete Cron Jobs. These are typically associated with a plugin or theme that you no longer use. The hook name usually gives you an idea of which plugin created the Cron Job.
  2. From your list of Cron Jobs (in WP Crontrol, this will once again be under Tools > Cron Events), locate the obsolete Cron Job.
  3. Once located, click on the ‘Delete’ button next to it. This action will remove the Cron Job from your schedule.
  4. Confirm the deletion in the popup warning. Be sure that you are deleting the correct Cron Job as this action is irreversible.
  5. Repeat this process for all the obsolete Cron Jobs on your site.

Remember, if you’re unsure about a Cron Job, it’s better to leave it alone than to delete it and potentially cause an even bigger issue on your site.

That’s It

Removing obsolete Cron Jobs from your WordPress site is an excellent way to clean up unnecessary clutter and optimize your site’s performance.

However, this process should be handled with care to avoid accidentally removing essential tasks.

Always ensure you have a full backup of your site before making such changes, and don’t hesitate to consult with a professional if you’re unsure. Better safe than sorry.

I hope this guide has shed some light on managing and removing obsolete Cron Jobs from your WordPress site.

If you have any questions, feel free to drop them in the comments below.

Mark is the CEO behind the WP Mayor project. He has been using WordPress since 2012, joining the WP Mayor team in 2014. Since then, he has helped to review, test, and write about hundreds of WordPress products and services; educating the community of millions of WordPress users around the globe.

Sponsored Ad

If you purchase through a link on our site, we may earn a commission.

All suggestions are anonymous.

More from our blog...

12 Responses

  1. Hi Jean,

    I have a question in relation to wp_cron.php. I have just upgraded an old website that had wp_cron.php already in the list of files – with a bunch of data in it.

    After I transferred the new website over my host said it was eating up too much CPU and said this was mostly due to wp_cron.php so they shut it down. Which helped. They also said adding the heatbeat plugin might help. I did it also seemed to help. However I think mostly it was due to one IP address taking up too many resources and I blocked that IP…. that in my opinion stopped the issue and now the CPU usage is normal.

    My site however is slow … I’ve removed a few cron jobs via a cron plugin. Sorry for the long winded comment, but here is the question πŸ™‚ ….

    I’m not familiar with the wp_cron.php file or the code within it. So given it is from an old site is it safe/wise to just remove this file???

  2. You’re great! Absolutely great! My shared hosting provider was continuously suspending my account from 6-7 days everyday at the same time in the evening. Got no proper reply from their customer support desk. Finally after hunting for various things, I landed up over here, did the steps you’ve mentioned and Voila! it got solved.. Thanks a lot

  3. Hi, Thank you for the information.
    I have a number of old cron jobs showing in cron view plugin, some going back to 2011.
    When I use your code in functions.php can I enter more than one cron name within brackets i.e. (“cron_name1,cron_name2,cron_name3”); or do I need to enter the full code for each cron_name removal.

  4. thank you very much for sharing, this trick helps me a lot, my web site is banned for extreme CPU use, because of this finally my site is stable.

    Thank you for sharing

Post a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay updated with WP Mayor's newsletter showcase every week

Stay on top of every new WordPress innovation and latest launches. Receive all our fresh product reviews and expert guides directly in your inbox.

Hosting Survey 2024

Are you happy with your hosting provider or are you over-paying for too little? Have your say below!

"*" indicates required fields

What's the main reason you picked this host?*
How happy are you with your host?*

OPTIONAL: If you'd like to receive the results of this survey, please enter your details below.