Deleting all wordpress posts in a website using phpMyAdmin

Delete all wordpress posts using phpMyAdmin

Deleting all wordpress posts can be a tedious task for any one who tries doing it using wordpress dashboard

However this task can be done easily by using a small tweak in phpMyAdmin

In phpMyAdmin just redirect to the database by selecting it and in the sql query tab just paste the code below and hit go

This automatically deletes all the posts, their taxonomies, tags and every other information related to the posts

delete a,b,c,d
FROM jp_posts a
LEFT JOIN jp_term_relationships b ON ( a.ID = b.object_id )
LEFT JOIN jp_postmeta c ON ( a.ID = c.post_id )
LEFT JOIN jp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id )
LEFT JOIN jp_terms e ON ( e.term_id = d.term_id )
WHERE e.term_id = X

For more posts like this on wordpress please visit Wordpress

phpmyadmin,wordpress