Skip to content

How to Clear Scheduled Action Logs in WordPress

Clear scheduled action logs in WordPress

If your WordPress admin feels slow, WooCommerce background jobs hang, or your database tables keep growing, you may need to clean up Action Scheduler logs.

Action Scheduler is the job queue used by plugins like WooCommerce, MailPoet, and others to run scheduled tasks in the background. Over time, completed and failed logs can pile up and create unnecessary database bloat.

Do not delete pending or in-progress actions

Deleting pending or in-progress actions can break renewals, emails, subscriptions, and other automation. This guide focuses on safe cleanup.


What you’ll do

  • Find the Scheduled Actions screen in WordPress
  • Delete old completed or failed actions safely
  • Clean up in bulk using WP-CLI (best for large sites)
  • Clean up via phpMyAdmin (advanced)

Before you start

  • Make a backup (or at least a database backup), especially for WooCommerce stores.
  • Pick a low-traffic time if the site is busy.

Method 1: Clean from the WordPress dashboard

Step 1: Open Scheduled Actions

You may find Scheduled Actions in one of these places:

  • WooCommerce → Status → Scheduled Actions (common on WooCommerce sites)
  • Tools → Scheduled Actions (also used by some setups)

If you can’t see it, Action Scheduler may not be active yet, or your plugin that uses it is disabled.

Step 2: Filter what you want to remove

Use the status filters:

  • Complete
  • Failed
  • Canceled (if shown)

Avoid:

  • Pending
  • In-progress

Step 3: Delete in small batches

  1. Filter by Complete (or Failed).
  2. Sort by oldest if available.
  3. Select a reasonable number.
  4. Bulk Actions → Delete → Apply.

Tip

If you have tens of thousands of rows, the dashboard can be slow. Use WP-CLI instead.


If your plan includes SSH/WP-CLI access, this is the cleanest approach.

Step 1: Run the cleaner

wp action-scheduler clean

Depending on your Action Scheduler version, this targets safe statuses (typically completed and canceled).

Step 2: Control what gets removed (safer for production)

# Clean only completed actions
wp action-scheduler clean --status=complete

# Clean completed + failed + canceled actions
wp action-scheduler clean --status=complete,failed,canceled

# Clean actions older than a certain date
wp action-scheduler clean --before="2025-01-01"

Warning

Start conservative. Clean complete first, then evaluate failed actions. Failed actions often indicate a real issue you should fix.


Method 3: Clean via phpMyAdmin (advanced)

Use this only if you are comfortable working with databases.

Step 1: Open phpMyAdmin

  • On cPanel, open phpMyAdmin from the Databases section.
  • On other panels, use the available database manager, or ask GOZEN HOST support if you’re unsure.

Step 2: Identify Action Scheduler tables

Your prefix may not be wp_. Look for tables like:

  • *_actionscheduler_actions
  • *_actionscheduler_logs

You may also see:

  • *_actionscheduler_groups
  • *_actionscheduler_claims

Step 3: Run a conservative cleanup (older rows only)

This example deletes completed/canceled/failed actions older than 30 days and then removes orphan logs.

Replace wp_ with your real table prefix.

DELETE FROM wp_actionscheduler_actions
WHERE status IN ('complete','canceled','failed')
  AND scheduled_date_gmt < (UTC_TIMESTAMP() - INTERVAL 30 DAY);

DELETE FROM wp_actionscheduler_logs
WHERE log_date_gmt < (UTC_TIMESTAMP() - INTERVAL 30 DAY);

DELETE FROM wp_actionscheduler_logs
WHERE action_id NOT IN (SELECT action_id FROM wp_actionscheduler_actions);

Warning

For very large tables, running one massive DELETE can be heavy. If the site is large, WP-CLI cleanup is usually safer and faster.


Troubleshooting tips

  • You don’t see Scheduled Actions: confirm WooCommerce (or the plugin using Action Scheduler) is active.
  • Failed actions keep returning: usually a symptom (WP-Cron not firing reliably, plugin conflicts, external API timeouts). Cleanup improves performance, but you should fix the root cause.
  • Admin is still slow: large databases often need broader tuning (indexes, autoload cleanup, cache).

What’s next

If failed actions keep appearing daily, open a support ticket with:

  • the plugin involved (WooCommerce, MailPoet, etc.)
  • screenshots of the failures
  • timestamps and hook names (if shown)

We’ll help you find the underlying cause, not just sweep the symptoms.