WordPress.org

Ready to get started?Download WordPress

Forums

Deleting large number of posts at the same time (4 posts)

  1. LennartF
    Member
    Posted 9 years ago #

    I am not yet on 1.5, and I need to delete a large number of non-contiguous posts in order to prune my blogsite.

    The only way to do this that I see is to delete each entry by itself. Is there any way to do mass deletes of certain posts?

  2. yokima
    Member
    Posted 9 years ago #

    Do they follow any logic at all (same category, a specific time period, etc)? You might be able to do so by logging in directly to your mySQL engine and running a query on it (or use an interface like the phpMyAdmin)

  3. LennartF
    Member
    Posted 9 years ago #

    Yes, but if I delete a comment field, do I also need to delete any entries in any other rows in any other tables? I.e. is there any risk that I destroy the referential integrity of the DB?

  4. yokima
    Member
    Posted 9 years ago #

    you should first know that I don't necessarily know what I am talking about (but since I got you into this and the rest of the people seem to wonder around w/1.5..), and my advice regarding php/mysql could be wrong. or, since you know what referential integrity is, my guess is as good as yours.

    ==============

    you mean deleting a post field, right? from my little experience with doing related tables in access I think that you are safe as long as the master table entry not reference child entries. if you open up wp_post, there isn't any reference to other tables, but in post2cat and wp_comment (and postmeta, but I odubt you use that one) there are references to wp_post.

    I have manually deleted several wp_post entries without doing proper work on post2cat (so there were a bunch ghost post2cat entries roaming around left over) and wp didn't seem to crash.

    so if you really wanted to be safe, you could start by using your sql rules for post2cat and wp_comment (both contain a post_id field) and then deleting your posts, although I'd think that's an unnecessary extra step.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.