logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
Delete all post of custom post type 'memberlist' and...

I need to Delete all posts of custom post type 'memberlist' and any data such as post-meta, or any other data related to that custom-post-id.

Would like SQL statement to execute from phpmyadmin.

This question has been answered.

69developer | 12/22/10 at 1:07pm Edit


(2) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    12/22/10
    1:27pm
    John Cotton says:

    DELETE FROM wp_posts WHERE post_type = 'memberlist';

    DELETE FROM wp_postmeta WHERE post_id NOT IN (SELECT id FROM wp_posts);


    You could - for good measure - remove all tags/category associations in any exist:


    DELETE FROM wp_term_relationships WHERE object_id NOT IN (SELECT id FROM wp_posts);


    PS Backup first!!!

    Previous versions of this answer: 12/22/10 at 1:27pm

  • avatar
    Last edited:
    12/27/10
    8:14am
    Rashid Aliyev says:

    DELETE * from wp_posts where post_type = "memberlist";

This question has expired.





Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.