I will use the wp-cli version:
wp post delete –force $(wp post list –post_type=post –format=ids –year=2008 –posts_per_page=10000)
I added the –force so that it will delete the post and not just put them in the trash.
Related Posts:
- Remove Categories / Tags From Admin Menu
- Setting Custom Sort Order of Posts within a Category
- Custom permalink structure only for default posts
- Exclude drafts in all() view of edit.php
- Is this the best (and only) option to style CSS for a given post type?
- Sort post by attributes ‘order’
- How to change the layout and styling of posts according to their category in WordPress?
- adding a custom css class to post
- Prevent duplicate posts in wp_insert_post using custom fields
- Add default content to post (for specific category)
- Pagination not working on Custom Page Template
- Display custom post types by date field
- How to hook a function only when I need to delete permanently a post?
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- display order of connections
- same template for multiple custom post type single
- How to place HTML below the title of the (custom) post overview
- How to get a nofication when post submitted
- user contributed content as custom post types
- Is there any WordPress alternative to Book module of Drupal?
- .current-menu-item class on custom post type children pages – again?
- Display page content AFTER a loop of posts
- Run a function when post is deleted?
- How to start with post number x?
- How can I create custom button in post.php
- how to replace embedded “full” sized images within a post with the “large” ones
- Downgrade user from role that allows post creation
- Sidebar links for different pages
- Deleted category by mistake, all posts now have categorized category. Can i revert that?
- Blog Posts in Custom Menu
- How to display data in archive page?
- Delete post by giving its link
- How to make classes for posts?
- Custom Post Type – Category Rewrite – Remove Rewrite from Sitemap
- CPT archive redirects to single post
- Prevent Delete Attachment by URL or When Submit
- Getting Custom Post Loop to display in Bootstrap 3 column grid
- Turn On Comments On Custom Post Types in Directory Theme
- ERROR: Your feed is invalid (after update WP4.7) in custom types
- Automatically add date to the auto generation of post slug
- Duplicate Custom Post Type and Taxonomy Slug
- How could I change my Permalink from blog to custom structure? [closed]
- WP Admin register taxonomy and post type performance
- Calling Different Custom Post Timestamps in a table
- WordPress Multisite – Create Default Post and New Category On New Site Install
- How to allow visitors to filter posts by multiple taxonomies
- How to include my own css in post
- a little direction on custom post type
- Format latest/newest post differently
- relating business and products with custom taxonomy?
- WordPress Query Posts From Category Post on Static Page
- Edit multiple custom post types while saving a new or edited post
- Create a custom posts page
- How to get different Related Posts
- How to allow multiple thumbnail upload for Posts?
- add external project to web site wordpress on production
- Deleted a user with administrator rights. Now all the data/content/images are lost. how to recover them back
- register_post_type permalink
- Custom Post Limit for homepage only without plugin?
- Inserting an example of the last 3 post on to the homepage
- Static pages not working
- Change default post style to columns
- Post titles and thumbnails as links to custom post types?
- Custom Post Type, post-formats associated to custom post type > 404 archives
- Adding a custom post type meta field to rss
- Help with listing current users submitted custom post type in template file
- Delete post from admin but not from database
- Custom Select Query – Selecting the Year?
- Deleting old posts
- How To Use Custom Tax of a Post Type
- What would causes search to return incorrect results?
- get posts, run a custom query, and join the results
- search form for custom fields
- Some custom post types did not return an object
- Display Post from Custom Post Type with Shortcode
- Tag for custom post type
- Modified core/image rendering not showing in posts – only on pages
- Not display an image of category of custom post
- Show post count in custom taxonomy page
- Post relationships/nesting
- Manual Scheduler For Custom Post Type
- Dev and prod on the same database- dev version active for IOS
- How to delete/customize imported demo content from a theme or add my own?
- Displaying dynamic content (blog posts/portfolio) on a static homepage and keep the blog post styles
- single- and archive- templates not being applied to custom post types, not even after flushing permalinks
- Multiple Custom Post Type loop logic
- WordPress search for specific Post Type
- How can you control what a user is allowed to post in the backend?
- How to show content of specific item on the same page?
- How to list all names and descriptions of a custom taxonomy
- How can I have the posts from one word press blog show on the presentation page of another word press site
- Show a Category Specific Info Box
- Make a custom URL and link to custom Template
- Special Query: Title, Terms, Content – %LIKE%
- First Custom Post Custom Fields Empty After New Custom Post
- WordPress 3.2 – Problem with WYSIWYG editors in a custom post type?
- How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?
- How to have more post in a page than in your home page
- Only show posts belonging to multiple cateogries at same time
- Notify/check if the content of a custom gutenberg block has changed on save_post