plugin-icon

WS Action Scheduler Cleaner

제작자: Winning Solutions·
Optimize your WordPress database by efficiently managing the Action Scheduler tables used by popular plugins like WooCommerce.
평가
5
버전
1.3.0
활성화된 설치 항목
2K
최근 업데이트일
May 27, 2026
WS Action Scheduler Cleaner

WS Action Scheduler Cleaner is a small tool designed to optimize your WordPress database by managing the Action Scheduler tables. Action Scheduler, a robust job queue and background processing library, is utilized by many popular plugins such as WooCommerce, WP Forms, and Jetpack to handle resource-intensive tasks asynchronously.

While Action Scheduler is crucial for the smooth operation of these plugins, its tables can grow significantly over time, potentially impacting your site’s performance. This is where WS Action Scheduler Cleaner comes in.

Key features:

  • Easily clear completed, failed, or canceled actions from the Action Scheduler tables
  • Set up automatic clearing schedules for efficient database maintenance
  • Optimize the database tables to reclaim unused space and potentially improve performance
  • Customize retention periods for logs and actions
  • User-friendly interface integrated into the WordPress admin area

By regularly cleaning up unnecessary data from Action Scheduler tables, you can:

  • Improve database query performance
  • Reduce database size
  • Enhance overall site speed and responsiveness

WS Action Scheduler Cleaner is an essential tool for any WordPress site using plugins that rely on Action Scheduler, especially high-traffic e-commerce sites or membership platforms that generate a large number of scheduled actions.

Usage

  1. In the WordPress admin panel, go to Tools > Action Scheduler Cleaner
  2. Select which action statuses you want to clear (completed, failed, canceled)
  3. Set up different automatic clearing schedules if desired
  4. Click “Clear Selected Actions” to manually clear actions – or let the automatic schedule handle it
  5. Optionally optimize the DB tables as well; this is your solution for when the size of the tables doesn’t seem to go down on simple clearing

For best results, we recommend setting up an automatic clearing schedule to maintain optimal database performance. Something like 7 days is usually sufficient. By default, Action Scheduler does this every 30 days, but only for completed and canceled actions, whereas you can control this aspect in the plugin. On deactivation of the plugin, the 30-day retention period as well as which actions get cleared will reset to their defaults.

Developer Information

Cleanup and optimization run in time-bounded chunks: each pass deletes up to batch_size rows per SQL statement and repeats until max_seconds elapses or no matching rows remain. Progress is saved between chunks so large tables can be processed without a single long request.

The following filters (since 1.3.0) let you tune behavior for your hosting environment. Add them in a custom plugin or your theme’s functions.php.

Manual cleanup (admin UI / AJAX)

  • wsacsc_ajax_cleanup_batch_size (default: 10000) — Maximum rows deleted per DELETE statement during manual clear operations initiated from the admin screen. Higher values can speed up very large tables but increase load per query.
  • wsacsc_ajax_cleanup_max_seconds (default: 18) — Seconds of work per AJAX request before the plugin saves progress and returns. The admin UI polls for the next chunk while you keep the page open. Increase on slow hosts if chunks finish too quickly; decrease if requests time out.

Scheduled cleanup (WP-Cron)

  • wsacsc_cron_cleanup_batch_size (default: 2000) — Same as the AJAX batch size, but for automatic retention cleanup run on a schedule. Defaults are lower than manual cleanup to reduce impact on live traffic.
  • wsacsc_cron_cleanup_max_seconds (default: 45) — Seconds of work per cron run before the job pauses and schedules continuation (see below).

Background continuation

  • wsacsc_cleanup_use_background_continuation (default: true) — When a chunk ends before deletion is finished, schedule a single WP-Cron event to resume the job in the background. This is important for scheduled cleanup on large tables and when no admin session is polling progress. Manual cleanup in the browser also continues via AJAX polling; setting this filter to false disables cron-based resumption only (unfinished scheduled jobs may stall unless something else triggers the next chunk).

Scheduled auto-optimize

After a scheduled retention pass deletes all matching rows for a table, the plugin may run OPTIMIZE TABLE automatically to reclaim disk space. Manual clear from the admin UI never auto-optimizes; use the Optimize button instead.

  • wsacsc_scheduled_auto_optimize_max_rows (default: 100000) — Run auto-optimize only if the table’s total row count is at or below this value after cleanup. Prevents long, blocking optimize operations on tables that are still huge. Values below 1000 are raised to 1000.
  • wsacsc_scheduled_auto_optimize_delay_seconds (default: 5) — Seconds to wait after the last delete batch before running OPTIMIZE TABLE, giving the database a short breather. Clamped between 0 and 60.

Example (gentler cron, no background continuation):

add_filter( 'wsacsc_cron_cleanup_batch_size', function () { return 500; } ); add_filter( 'wsacsc_cron_cleanup_max_seconds', function () { return 30; } ); add_filter( 'wsacsc_cleanup_use_background_continuation', '__return_false' );

Author: Winning Solutions Author URI: https://www.winning-solutions.de

무료유료 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 7.0
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.