• Resolved wpnetbie

    (@wpnetbie)


    What code I must use in phpmyadmin for delete all post with No Tags.?????????
    I have a blog with lot of posts, the important ones have tags, and those that are not interesting have not tags. So I need to delete all post with No Tags.
    I know I can do it manually but I guess that with the correct code in phpmyadmin it can be done with a code. Anybody can help ?????
    Thanks in advance for your help.

    PS- I am using Wp 2.7

Viewing 5 replies - 1 through 5 (of 5 total)
  • randinicole

    (@randinicole)

    Why not just sort the view by uncategorized, click check all and deleted the batch.

    Thread Starter wpnetbie

    (@wpnetbie)

    thanks randinicole but all are categorized

    randinicole

    (@randinicole)

    Blah lol ?? read that wrong haha

    davesgonebananas

    (@davesgonebananas)

    DELETE FROM wp_posts WHERE wp_posts.post_type = 'post' AND wp_posts.post_status = 'publish' AND wp_posts.ID NOT IN (
    SELECT DISTINCT wp_term_relationships.object_id
    FROM wp_term_relationships
    JOIN wp_term_taxonomy ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
    WHERE taxonomy = 'post_tag'
    )

    This will delete the posts without tags but it won’t delete the revisions

    Thread Starter wpnetbie

    (@wpnetbie)

    Thanks a lot davesgonebananas , you make my day. Congratulations !!!!
    Also thanks randinicole for your very kind attention.
    By the way: what code I must use in phpmyadmin for delete draft post without title, I mean with empty title (0 letters on title) ??????
    Thanks again in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to delete post with No Tags’ is closed to new replies.