{"id":1965043,"date":"2025-05-06T08:36:18","date_gmt":"2025-05-06T12:36:18","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1965043"},"modified":"2026-04-21T12:50:57","modified_gmt":"2026-04-21T16:50:57","slug":"delete-events","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/delete-events\/","title":{"rendered":"Deleting Events from the Calendar"},"content":{"rendered":"\n<p>There are several ways to remove events from your WordPress site, depending on whether you want to delete a batch of events right now or set up automatic cleanup for old events over time. This article covers all of them: manual bulk deletion tools, the built-in automatic trashing feature, and a few customizations for the automatic cleanup.<\/p>\n\n\n\n<p>\ud83d\udca1 <strong>Important Notice:<\/strong> Before proceeding with any of these methods, we strongly recommend <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/creating-site-backups\/\">creating a full site backup<\/a> or <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/how-to-set-up-a-staging-site-for-your-wordpress-website\/\">testing on a staging site first<\/a>. Deleting content is irreversible without a backup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-manual-bulk-deletion\">Manual Bulk Deletion<\/h2>\n\n\n\n<p>If your site has a large number of events and you want to delete them in bulk, there are three methods to choose from \u2014 ranging from beginner-friendly to advanced.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-option-1-wordpress-s-built-in-bulk-delete-tool\">Option 1: WordPress&#8217;s Built-In Bulk Delete Tool<\/h3>\n\n\n\n<p>WordPress includes a built-in bulk action to delete posts, including events:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>From your WordPress dashboard, go to <strong>Events \u2192 All Events<\/strong>.<\/li>\n\n\n\n<li>At the top right of the screen, click <strong>Screen Options<\/strong> and increase <strong>Number of items per page<\/strong> to your preferred amount (e.g. 100).\n<ul class=\"wp-block-list\">\n<li>\u26a0\ufe0f Higher numbers may take longer to load or cause timeouts on slower servers.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click <strong>Apply<\/strong>.<\/li>\n\n\n\n<li>Use the checkbox at the top of the event list to <strong>select all events on the page<\/strong>.<\/li>\n\n\n\n<li>From the <strong>Bulk Actions<\/strong> dropdown, select <strong>Move to Trash<\/strong> and click <strong>Apply<\/strong>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/07\/Screenshot-2025-07-21-at-23.45.29-1024x499.png\" alt=\"WordPress bulk actions dropdown with Move to Trash selected\"\/><\/figure>\n\n\n\n<p>To permanently delete events from the Trash, go to the <strong>Trash<\/strong> tab and click <strong>Empty Trash<\/strong>. This fully removes those events from your site.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/07\/Screenshot-2025-07-22-at-00.26.57-1024x549.jpg\" alt=\"The Empty Trash button on the Trash tab\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-option-2-use-a-plugin\">Option 2: Use a Plugin<\/h3>\n\n\n\n<p>For more advanced filtering and control, you can use a plugin such as <a href=\"https:\/\/wordpress.org\/plugins\/wp-bulk-delete\/\">WP Bulk Delete<\/a>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install and activate <strong>WP Bulk Delete<\/strong>.<\/li>\n\n\n\n<li>Go to <strong>WP Bulk Delete \u2192 Delete Posts<\/strong>.<\/li>\n\n\n\n<li>Under <strong>Basic Filter<\/strong>, choose <strong>Events<\/strong> as the post type.\n<ul class=\"wp-block-list\">\n<li>\u26a0\ufe0f Make sure only &#8220;Events&#8221; is selected to avoid deleting other content types.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Use the additional filters to refine which events to delete:\n<ul class=\"wp-block-list\">\n<li><strong>Post Status<\/strong>: Published, Draft, Pending, etc.<\/li>\n\n\n\n<li><strong>Date Filter<\/strong>: Delete events created within a specific date range.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>In the <strong>Action<\/strong> section:\n<ul class=\"wp-block-list\">\n<li>Set a limit on how many events to delete at once to reduce server load.<\/li>\n\n\n\n<li>Choose whether to <strong>Move to Trash<\/strong> or <strong>Delete Permanently<\/strong>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click <strong>Delete<\/strong> to begin the cleanup process.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/07\/Screenshot-2025-07-22-at-00.09.35-1024x505.png\" alt=\"WP Bulk Delete filter configuration\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/07\/Screenshot-2025-07-22-at-00.13.46-1024x423.jpg\" alt=\"WP Bulk Delete action settings\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-option-3-direct-sql-query-advanced\">Option 3: Direct SQL Query (Advanced)<\/h3>\n\n\n\n<p>\u26a0\ufe0f <strong>Warning:<\/strong> This method permanently deletes all events from your database. Use with caution and only after creating a backup.<\/p>\n\n\n\n<p>If you&#8217;re comfortable working with your database, you can run the following SQL query to delete all events, including their metadata:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DELETE p, pm\nFROM wp_posts p\nLEFT JOIN wp_postmeta pm ON pm.post_id = p.ID\nWHERE p.post_type = 'tribe_events';<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This command removes all events, regardless of status (published, draft, pending, etc.).<\/li>\n\n\n\n<li>It also deletes any custom fields and meta data linked to those events.<\/li>\n<\/ul>\n\n\n\n<p>You can run this SQL query directly from your hosting control panel (e.g., phpMyAdmin), or use a plugin like <a href=\"https:\/\/wordpress.org\/plugins\/wp-phpmyadmin-extension\/\">WP phpMyAdmin Extension<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-automatic-trashing-of-old-events\">Automatic Trashing of Old Events<\/h2>\n\n\n\n<p>Rather than cleaning up events manually on a schedule, you can have The Events Calendar automatically move old events to the Trash based on their end date. This is configured at <strong>Events \u2192 Settings \u2192 General \u2192 Maintenance<\/strong> via the <strong>Move to trash events older than<\/strong> option.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-it-works\">How It Works<\/h3>\n\n\n\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 \u2014 particularly those on shared or resource-limited hosting \u2014 from becoming slow or crashing due to heavy background processes. For enhanced reliability, you can <a href=\"https:\/\/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<h3 class=\"wp-block-heading\" id=\"h-why-are-there-limitations-on-event-trashing\">Why Are There Limitations on Event Trashing?<\/h3>\n\n\n\n<p>Servers, especially shared ones, can become overwhelmed if too many processes happen at once. 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<h3 class=\"wp-block-heading\" id=\"h-what-happens-if-i-recently-enabled-auto-trashing\">What Happens If I Recently Enabled Auto-Trashing?<\/h3>\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. 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-customizing-automatic-trashing\">Customizing Automatic Trashing<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-adjusting-how-many-events-get-trashed\">Adjusting How Many Events Get Trashed<\/h3>\n\n\n\n<p>If you want to speed up the process, you can increase the number of events deleted per run and run the trashing more frequently by adding the following filters:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Increase the number of past events trashed automatically.\nadd_filter( 'tribe_events_delete_old_events_sql_args', function ( $args ) {\n    $args&#91;'limit'] = 100; \/\/ Change the number as needed.\n    return $args;\n} );\n\n\/\/ Increase the frequency of the auto-trashing. (Default is 'twicedaily'.)\nadd_filter( 'tec_events_event_cleaner_trash_cron_frequency', function( $frequency ) {\n    return 'hourly'; \/\/ Options include 'hourly', 'twicedaily', and 'daily'.\n} );<\/code><\/pre>\n\n\n\n<p>Our recommendation is to increase the frequency rather than the number of events trashed per run. With an <code>hourly<\/code> setting, 660 events are trashed per day.<\/p>\n\n\n\n<p><strong>Should you always use higher limits?<\/strong> No \u2014 only temporarily. Increase the limits if you&#8217;re trying to quickly clean up a large backlog of past events. Once the backlog is cleared and your events are being regularly maintained, switch back to the defaults to avoid putting unnecessary load on your server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-excluding-drafts-from-automatic-trashing\">Excluding Drafts from Automatic Trashing<\/h3>\n\n\n\n<p>By default, the automatic trashing process can affect event drafts alongside published events. If you want to preserve drafts and only let the cleanup run against published events, use this snippet:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter( 'tribe_events_delete_old_events_sql', function( $sql ) {\n    \/\/ Change the condition to exclude draft posts from cleanup.\n    $sql = str_replace(\n        \"post_status NOT IN ( 'trash', 'tribe-ignored' )\",\n        \"post_status NOT IN ( 'trash', 'tribe-ignored', 'draft' )\",\n        $sql\n    );\n\n    return $sql;\n}, 10, 1 );<\/code><\/pre>\n\n\n\n<p>Add this snippet to your theme&#8217;s <code>functions.php<\/code> file, or use your preferred method for integrating snippets into your WordPress site \u2014 such as the free <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\">Code Snippets<\/a> plugin. See <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">Best Practices for Implementing Custom Code Snippets<\/a> for guidance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-understanding-trashed-vs-ignored-events\">Understanding Trashed vs Ignored Events<\/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>, that&#8217;s because the two statuses serve different purposes depending on where the event came from.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-why-are-some-events-set-to-ignored-instead-of-trashed\">Why Are Some Events Set to &#8220;Ignored&#8221; Instead of &#8220;Trashed&#8221;?<\/h3>\n\n\n\n<p>When events are imported using <a href=\"https:\/\/theeventscalendar.com\/products\/event-aggregator\/\">Event Aggregator<\/a>, they&#8217;re handled differently. If you move an imported event to the Trash, Event Aggregator automatically places it on the <strong>Ignore<\/strong> list instead.<\/p>\n\n\n\n<p>This prevents the same event from being re-imported later. If trashed events were deleted permanently in the usual way, Event Aggregator would see them as missing from your calendar and simply re-import them on the next scheduled run. Marking an event as Ignored tells the system: <em>&#8220;Don&#8217;t import this event again.&#8221;<\/em><\/p>\n\n\n\n<p>For more on managing ignored events, see <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/managing-imported-events\/\">Managing Imported Events<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-are-old-events-actually-deleted\">How Are Old Events Actually Deleted?<\/h3>\n\n\n\n<p>The <strong>Move to trash events older than<\/strong> feature in The Events Calendar only moves events to Trash \u2014 it doesn&#8217;t delete them permanently. That part is handled by WordPress itself.<\/p>\n\n\n\n<p>By default, WordPress automatically deletes any post (including events) after it&#8217;s been in the Trash for more than <strong>30 days<\/strong>. This grace period gives you a window to restore events that were trashed by mistake before they&#8217;re gone for good.<\/p>\n\n\n\n<p>\ud83d\udd14 <strong>Note:<\/strong> Events on the Ignored list are <em>not<\/em> automatically deleted by WordPress. If you want to remove ignored events, you&#8217;ll need to do that manually.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ensuring-all-old-events-are-fully-deleted\">Ensuring All Old Events Are Fully Deleted<\/h3>\n\n\n\n<p>For <strong>trashed events<\/strong>, WordPress automatically and permanently deletes them after 30 days. To change this timeframe, see the WordPress codex on the <a href=\"https:\/\/codex.wordpress.org\/Trash_status#EMPTY_TRASH_DAYS_option\">EMPTY_TRASH_DAYS option<\/a>.<\/p>\n\n\n\n<p>For <strong>ignored events<\/strong>, there&#8217;s no automatic deletion. If you want to clear them out faster, you can use <a href=\"https:\/\/gist.github.com\/andrasguseo\/08d42610754044b475af374630d47b34\">this snippet<\/a>, which adds a <strong>Permanently Delete All<\/strong> button (similar to Empty Trash) to the Ignored archive for one-click cleanup.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are several ways to remove events from your WordPress site, depending on whether you want to delete a batch of events right now or set up automatic cleanup for old events over time. This article covers all of them: manual bulk deletion tools, the built-in automatic trashing feature, and a few customizations for the&#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":[24,38,130,59],"tags":[],"stellar-product-taxonomy":[],"class_list":["post-1965043","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-faq","category-advanced-post-manager","category-php-function-snippets"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"},{"value":38,"label":"FAQ"},{"value":130,"label":"Managing Events"},{"value":59,"label":"PHP Functions &amp; 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:\/\/theeventscalendar.com\/knowledgebase\/author\/darian\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizations","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":40,"filter":"raw","term_order":"0","cat_ID":24,"category_count":40,"category_description":"","cat_name":"Customizations","category_nicename":"customizing","category_parent":0},{"term_id":38,"name":"FAQ","slug":"faq","term_group":0,"term_taxonomy_id":38,"taxonomy":"category","description":"","parent":0,"count":17,"filter":"raw","term_order":"0","cat_ID":38,"category_count":17,"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":20,"filter":"raw","term_order":"0","cat_ID":130,"category_count":20,"category_description":"","cat_name":"Managing Events","category_nicename":"advanced-post-manager","category_parent":61},{"term_id":59,"name":"PHP Functions &amp; Snippets","slug":"php-function-snippets","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":32,"filter":"raw","term_order":"0","cat_ID":59,"category_count":32,"category_description":"","cat_name":"PHP Functions &amp; Snippets","category_nicename":"php-function-snippets","category_parent":24}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1965043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1965043"}],"version-history":[{"count":11,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1965043\/revisions"}],"predecessor-version":[{"id":1969671,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1965043\/revisions\/1969671"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1965043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1965043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1965043"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1965043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}