You have a WordPress site online and you want delete all old published posts but you don't know how to do it? You must know that WordPress through its platform allows you to delete articles by performing a few simple steps. Read on and I'll reveal to you how to delete all posts in WordPress.
delete a post in WordPress you must enter its platform with your username and password credentials and access the Control Panel. Here you open the menu "Articles"And click on"All items". If you remember perfectly the title of the article to be deleted, just search for it and type it, in the upper right part of the screen, and then press the button Search for articles. Once found, you have to put a check next to the title and click on Basket.
If you don't remember the title, you can use the platform filters: search by category and by date. Or view all posts and locate the one to delete.
This is made simple when you need to delete a post in WordPress or act on a handful of posts. But when do you have to delete all old published posts? In this case, putting a flag on Titles to select all the posts to be deleted on the page is possible, but feasible only if we are faced with a few posts.
The most convenient solution that can come to your aid is to use a SQL query directly on the WordPress database.
Learn PhpMyAdmin you can type the following query ed delete all posts published in WordPress in a few moments:
DELETE FROM `wp_posts` WHERE `post_type` = 'post';
In case you want to delete old posts published more than 300 days ago, you can delete old posts by doing this:
DELETE FROM `wp_posts` WHERE `post_type` = ‘post’ And DateDiff (NOW(), `post_date`) > 300;