{"id":1965043,"date":"2025-05-06T08:36:18","date_gmt":"2025-05-06T12:36:18","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?p=1965043"},"modified":"2025-05-06T08:36:20","modified_gmt":"2025-05-06T12:36:20","slug":"how-does-move-to-trash-events-older-than-work","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/how-does-move-to-trash-events-older-than-work\/","title":{"rendered":"How does &#8220;Move to trash events older than&#8221; work?"},"content":{"rendered":"\n<p>The automatic event trashing process is intentionally designed to be <strong>gentle on your server<\/strong>. By default, <a href=\"https:\/\/developer.wordpress.org\/plugins\/cron\/\">WP-Cron<\/a> handles the removal of past events:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Runs <strong>twice a day<\/strong><\/li>\n\n\n\n<li>Deletes <strong>15 events per run<\/strong> (30 events per day total)<\/li>\n<\/ul>\n\n\n\n<p>This cautious approach helps protect websites, particularly those on shared or resource-limited hosting, from becoming slow or even crashing due to heavy background processes.<\/p>\n\n\n\n<p>For enhanced reliability, you can <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/how-to-disable-wp-cron-and-set-up-a-real-cron-job\/\">configure a real cron job<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Are There Limitations on Event Trashing?<\/h2>\n\n\n\n<p>Servers, especially shared ones, can become overwhelmed if too many processes happen at once.<br>Deleting 100+ events every few minutes, alongside normal WordPress tasks and other plugin activities, could bog down your site \u2014 or even take multiple sites offline.<\/p>\n\n\n\n<p>The default behavior balances <strong>performance<\/strong> and <strong>maintenance<\/strong>, ensuring your site stays healthy while keeping your event database clean.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Happens if I Recently Enabled Auto-Trashing?<\/h2>\n\n\n\n<p>If you just turned on automatic trashing but already have <strong>hundreds of past events<\/strong>, the system needs time to catch up.<br>With the default settings (30 events\/day), clearing a large backlog can take several days or longer \u2014 depending on how many events you have.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-adjusting-how-many-events-get-trashed-advanced\">Adjusting How Many Events Get Trashed (Advanced)<\/h2>\n\n\n\n<p>If you want to speed up the process, you can <strong>increase the number of events deleted<\/strong> at once and <strong>run the trashing more frequently<\/strong> by adding the following filters to your site\u2019s code:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n\/\/ Increase the number of past events trashed automatically.\nadd_filter( &#039;tribe_events_delete_old_events_sql_args&#039;, function ( $args ) {\n    $args&#x5B;&#039;limit&#039;] = 100; \/\/ Change the number as needed.\n    return $args;\n} );\n\n\/\/ Increase the frequency of the auto-trashing. (Default is &#039;twicedaily&#039;.)\nadd_filter( &#039;tec_events_event_cleaner_trash_cron_frequency&#039;, function( $frequency ) {\n    return &#039;hourly&#039;; \/\/ Options include &#039;hourly&#039;, &#039;twicedaily&#039;, and &#039;daily&#039;.\n} );\n<\/pre><\/div>\n\n\n<p>Our recommendation is to rather increase the frequency, than the number of events trashed. With an &#8216;hourly&#8217; setting 660 events should be trashed in a day.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-should-i-always-use-higher-limits\">Should I Always Use Higher Limits?<\/h2>\n\n\n\n<p>No \u2014 <strong>only temporarily<\/strong>.<\/p>\n\n\n\n<p>It\u2019s a good idea to increase the limits if you\u2019re trying to <strong>quickly clean up<\/strong> a large number of past events.<br>Once the backlog is cleared and your events are being regularly maintained, we recommend switching back to the defaults to avoid putting unnecessary load on your server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding Trashed vs Ignored Events and How Deletion Works<\/h2>\n\n\n\n<p>If you&#8217;ve noticed that some old events end up in the <strong>Trash<\/strong> while others are marked as <strong>Ignored<\/strong>, you\u2019re not alone \u2014 and it can definitely feel confusing at first. Let\u2019s walk through what\u2019s happening behind the scenes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Are Some Events Set to &#8220;Ignored&#8221; Instead of &#8220;Trashed&#8221;?<\/h2>\n\n\n\n<p>When events are <strong>imported using <a href=\"https:\/\/theeventscalendar.com\/products\/event-aggregator\/\">Event Aggregator<\/a><\/strong>, they are handled a little differently. If you move an imported event to the <strong>trash<\/strong>, it doesn\u2019t just sit there like regular WordPress content. Instead, Event Aggregator puts it on the \u201c<strong>Ignore<\/strong>\u201d list. Why? Because this helps prevent the same event from being re-imported later on.<\/p>\n\n\n\n<p>If trashed events were treated the usual way and deleted permanently, Event Aggregator would see them as missing and simply re-import them during the next time. That\u2019s not ideal\u2014especially if you intentionally removed the event in the first place.<\/p>\n\n\n\n<p>So, marking an event as <strong>Ignored<\/strong> tells the system: <em>\u201cDon&#8217;t import this event again in the future.\u201d<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Are Old Events Actually Deleted?<\/h2>\n\n\n\n<p>The \u201c<strong>Move to trash events older than<\/strong>\u201d feature in The Events Calendar is designed to clean things up a bit by moving old events to the Trash \u2014 but it doesn\u2019t delete them permanently.<\/p>\n\n\n\n<p>That part is actually handled by WordPress itself. By default, WordPress will automatically delete any post, including events, after it\u2019s been sitting in the Trash for more than <strong>30 days.<\/strong> It\u2019s a helpful safeguard \u2014 giving you a grace period in case something was trashed by mistake and needs to be restored before it\u2019s gone for good.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\ud83d\udd14 <strong>Note:<\/strong><br>Events that have been moved to the <strong>Ignored list<\/strong> are <em>not<\/em> automatically deleted by WordPress. If you want to remove ignored events, you\u2019ll need to do this manually.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">How Can I Ensure All Old Events Are Fully Deleted?<\/h2>\n\n\n\n<p>When an event is moved to the <strong>Trash<\/strong>, WordPress will automatically and permanently delete it after 30 days. This is the default behavior, but if you&#8217;d prefer a different timeframe, you can change it using a <a href=\"https:\/\/codex.wordpress.org\/Trash_status#EMPTY_TRASH_DAYS_option\">code snippet<\/a>.<\/p>\n\n\n\n<p>On the other hand, <strong>Ignored events<\/strong> work a bit differently. They aren&#8217;t automatically deleted, so they\u2019ll remain in your system unless you manually remove them. If you&#8217;re looking for a faster way to clear them out, we\u2019ve got a handy <a href=\"https:\/\/gist.github.com\/andrasguseo\/08d42610754044b475af374630d47b34\">snippet<\/a> you can use. It adds a \u201c<strong>Permanently Delete All<\/strong>\u201d button\u2014just like the familiar \u201c<strong>Empty Trash<\/strong>\u201d option\u2014to help you clean things up with a single click.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The automatic event trashing process is intentionally designed to be gentle on your server. By default, WP-Cron handles the removal of past events: This cautious approach helps protect websites, particularly those on shared or resource-limited hosting, from becoming slow or even crashing due to heavy background processes. For enhanced reliability, you can configure a real&#8230;<\/p>\n","protected":false},"author":62,"featured_media":1955565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[38,130,79],"tags":[],"stellar-product-taxonomy":[],"class_list":["post-1965043","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-faq","category-advanced-post-manager","category-snippets"],"acf":[],"taxonomy_info":{"category":[{"value":38,"label":"FAQ"},{"value":130,"label":"Managing Events"},{"value":79,"label":"Snippets"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Darian","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/darian\/"},"comment_info":0,"category_info":[{"term_id":38,"name":"FAQ","slug":"faq","term_group":0,"term_taxonomy_id":38,"taxonomy":"category","description":"","parent":0,"count":25,"filter":"raw","term_order":"0","cat_ID":38,"category_count":25,"category_description":"","cat_name":"FAQ","category_nicename":"faq","category_parent":0},{"term_id":130,"name":"Managing Events","slug":"advanced-post-manager","term_group":0,"term_taxonomy_id":130,"taxonomy":"category","description":"","parent":61,"count":44,"filter":"raw","term_order":"0","cat_ID":130,"category_count":44,"category_description":"","cat_name":"Managing Events","category_nicename":"advanced-post-manager","category_parent":61},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1965043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1965043"}],"version-history":[{"count":9,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1965043\/revisions"}],"predecessor-version":[{"id":1965177,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1965043\/revisions\/1965177"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1965043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1965043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1965043"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1965043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}