24/7 HUMAN WORDPRESS WATCH · SAN DIEGO, CA · SINCE 1998
HackGuard.com Managed WordPress Security with Heart
TOPIC CLUSTER · SPEED & TECHNICAL SEO

How to Clear Stuck Cron Jobs in WordPress (wp-cron Cleanup Guide)

Jim Walker By Jim Walker, The Hack Repair Guy™ Updated Topic: WordPress Performance, Cron & Technical SEO
Quick Answer

WordPress stores scheduled tasks inside the cron row of the wp_options table. When poorly coded plugins are removed, they often leave thousands of old cron hooks behind, slowing down every page load. Back up your database first, then clear stuck cron events with WP Crontrol or WP-CLI.

How to Clear Stuck Cron Jobs in WordPress (wp-cron Cleanup Guide)
How old scheduled tasks pile up inside wp_options cron arrays after plugins are deleted, and how to inspect and clear stuck WordPress cron events.

If you've noticed your website has grown slower over time for no apparent reason, scheduled tasks just may be the hidden reason why.

WordPress scheduled tasks use Cron, a time-based job scheduler in Unix. Stale, not executed Cron jobs may stack up, causing database bloat and slow loading of your website.

The reasons why this may occur are varied. Badly coded plugins, an improperly set up manual Cron job for wp-cron.php, and scheduled tasks left behind after deleting a backup or security plugin are just a few reasons why queued Cron events may stack up on you unexpectedly.

What are scheduled events in WordPress?

Scheduled events are tasks like those run by the Disqus plugin; security and backup plugins; and many others.

From the WordPress.org Codex, "Function Reference/wp schedule event":

Schedules a hook which will be executed by the WordPress actions core on a specific interval, specified by you. The action will trigger when someone visits your WordPress site, if the scheduled time has passed. See the Plugin API for a list of hooks.

Do I have a problem with Cron events?

Luckily we have a plugin (or three) for that. Try any of the below:

FFF Cron Manager

Cron View

WP CRontrol

If after checking your WordPress Cron list, you find you've collected thousands of not executed tasks over time, the solution is relatively easy. Use any of the above plugins or run the MySQL command show below to clear them.

My Cron list is so long I can't delete them with a plugin, what next?

Watch the "How to Clear Your Pending WordPress Cron Tasks in phpMyAdmin (in 14 seconds)" video below.

After logging into phpMyAdmin, enter the text below as shown in the video above, then click the "Go" button to complete the removal of all current Cron tasks:

UPDATE wp_options SET option_value = '' WHERE option_name = 'cron';

Once I clear all of the Cron tasks from my database then what?

Start by checking your website to verify all is loading. If all goes well, you may notice a snappier WordPress Dashboard and site loading. You're welcome!

Though be sure to re-check your WordPress Cron list again in 24 hours. If something within your site remains misconfigured and continues to cause scheduled tasks to stack up as they had before, you'll need to work that issue next to prevent the re-bloating of your database in future.

And Enjoy!

I've posted a few related article links below. If you have questions just pick up the phone and call anytime, Jim Walker, The Hack Repair Guy, (619) 479-6637

How do I reset my WordPress password?

WordPress Troubleshooting and How to Fix Common Errors

Protecting WordPress Against Brute Force and Denial of Service Attacks

Frequently asked questions

What is the fastest way to fix or prevent this issue on my WordPress site?
WordPress stores scheduled tasks inside the cron row of the wp_options table. When poorly coded plugins are removed, they often leave thousands of old cron hooks behind, slowing down every page load. Back up your database first, then clear stuck cron events with WP Crontrol or WP-CLI.
Can HackGuard.com handle speed, cron & seo for my WordPress site?
Yes. For $14.95/month (or $49.85/month for up to 10 sites), Jim Walker and the HackGuard team perform a 9-point manual security and database overhaul in Week 1, test all core and plugin updates weekly by hand, maintain 60-day offsite cloud backups, and back your site with a free HackRepair.com cleanup guarantee. Call Jim directly at (619) 479-6637.
Jim Walker, The Hack Repair Guy

Written and reviewed by Jim Walker, The Hack Repair Guy™

Jim Walker has protected and repaired WordPress websites since 1998. Want Jim to handle your WordPress security, weekly updates, and 60-day offsite cloud backups for 50 cents a day?

Client Video Story