If you’d like to use a plugin to do this work, then the WP Bulk Delete Plugin should do the trick for you.
First, go to your Post section in the Admin area of your backend.
The Bulk Delete plugin lets you choose to delete posts based on a number of different options. For example, you can delete posts based on
- Basic Filter
- WooCommerce Filter
- Advanced Category Filter
- Author Filter
- Advanced Date Filter
- Delete Post Feature Image Filter
- Custom Field Filter
- Advanced Filter
- Custom Query Filter
- Action
Basic Filter
post type of items to delete :- Select the post type of items to delete
Post Status :- You can delete only published posts, private posts, scheduled posts, draft posts, pending posts.
WooCommerce Filter
WooCommerce Order Status :- You can delete WooCommerce orders using this section.
Advanced Category Filter
Post Taxonomy :- In the Advanced Category Filter, the Post Taxonomy option is used to select Categories or Tags.
Delete Post From Selected Category Only :- By selecting this option, only the selected category posts will be deleted, but if the post has another category with the selected category, that post will not be deleted (which means posts that have multiple categories will not be deleted)
Author Filter
Authors :- This option will help you delete posts from a specific selected author.
Advanced Date Filter
Post Date:- You can delete a post using the 3 options in the delete post date.
=> older than: You can delete posts that are older than your selected days.
=> Posted within last: You can delete posts that are posted within the last of your selected days.
=> 1 Month: You can delete posts that are posted within the last 1 month.
=> 2 Months: You can delete posts that are posted within the last 2 months.
=> 1 Year: You can delete posts that are posted within the last 1 year.
=> 2 Years: You can delete posts that are posted within the last 2 years.
=> Posted between If you want to delete a post between the start date and the end date. Then this option will be helpful for you.
Post Modified:- You can delete a post using the 3 options in the delete post date interval.
=> older than: You can delete posts that are older than your selected days.
=> older than: You can delete posts that are older than your selected days.
=> Posted within last: You can delete posts that are posted within the last of your selected days.
=> Posted between If you want to delete a post between the start date and the end date. Then this option will be helpful for you.
Delete Post Feature Image Filter
Delete Post Featured image:- It enables the removal of the featured image of the post, if the image is a featured image of multiple posts, it will not be removed. and If the image is being used in a place other than the featured image, it will be deleted.
Custom Field Filter
Custom fields settings :- Use this filter to delete posts based on custom meta values. Enter the meta key and the value you want to match. Choose the appropriate comparison type from the dropdown to specify how the value should be compared.
Advanced Filter
If Post Title Contains:- in this option, you can delete the post by title. here are 2 options to filter the title
Delete It: this option will help If you want to delete a post whose title matches the post title have added in the input.
Don’t Delete t: this option will help If you want to delete a post whose title does not match the post title have added in the input.
If Post Content Contains:- in this option, you can delete the post by Content. here are 2 options to filter the Content
Delete It: this option will help If you want to delete a post whose Content matches the post Content have added in the input.
Don’t Delete t: this option will help If you want to delete a post whose Content does not match the post Content have added in the input.
Post Links:- You can delete a post by its URL, you can add multiple URLs comma-separated, and delete posts in bulk.
Post Content Count:- You can delete a post using the 2 options in the deleted post by Content Count.
=> Less Than : You can delete posts that are less than your selected character count limit.
=> Greater Than : You can delete posts that are greater than your selected character count limit.
Post Content Word Count:- You can delete a post using the 2 options in the deleted post by Content Count.
=> Less Than : You can delete posts that are less than your selected Word count limit.
=> Greater Than : You can delete posts that are greater than your selected Word count limit.
Custom Query Filter
Post Delete from Custom Query:- Enable this option to delete posts based on custom queries. Note that this option is only effective when using the “Delete Permanently” feature.
Action
Limit:- Set the limit over post delete. It will delete only the first limit posts. For example, if you write a limit of 2 you delete a maximum of 2 posts/pages.
Detele Time:- WP Bulk Delete Pro provides functionality to schedule deleting at a particular time. and You can choose the scheduled at option at Delete Time to schedule delete. it has 2 options.
Delete now => It will start the delete operation just after you press the delete button.
Schedule Delete => If you want to run the delete operation later at a particular time. You can also repeat delete operations Once Hourly, Once a Month, once weekly, Twice Daily, Once Daily. You can see repetitive scheduled deletes at the WP Bulk Delete>Schedule Delete page