WordPress Tricks

wp_actionscheduler_logs Huge size issue and how to solve this

** If the code shared below don’t work, then you can clear the table as per the screenshot i shared below

The database table becomes huge, it may be using either any SEO or Cache plugins ( my guess) you can see the size in the screenshot below, you can clear it as per the screenshot

wp_actionscheduler_logs Huge size issue and how to solve this

also one.com provides this code which should clear the table within 7 days ( which was 30 days by default)

add_filter( 'action_scheduler_retention_period', 'onecom_action_scheduler_purge' );
/**
* Change Action Scheduler default purge to 1 week
*/
function onecom_action_scheduler_purge() {
return 604800;
}

you need to put this above code in function.php ( screenshot below)

wp_actionscheduler_logs Huge size issue and how to solve this function php

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s