The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Deleted user's posts (3 posts)

  1. graemep
    Posted 11 years ago #

    What happens to a user's posts when they are deleted?

    I am clear about what happens if I reduce a user's level (and reducing to zero is almost as good as deleting) but I could not find anything on what happens if a user a deleted altogether (which is possible?).

  2. Kafkaesqui

    Posted 11 years ago #

    Deleted posts are just that; deleted from the database. If you mistakenly delete a post, the only way to get it back is to A. pull it from a back up of the database, B. dig it out of the Google cache or a browser's disk cache , or C. you had it memorized.

    Yes, a user can be deleted, and for the purpose of retaining posts, shorting them to level 0 is the best alternative to removing them. Of course, if in the end you really do need to delete an account, you can reassign their posts to another user (I know of someone who uses a *dummy* login for that). There's a quick SQL command way of doing that:

    UPDATE wp_posts SET post_author = '1' WHERE post_author = '10';

    The first post_author value should equal the user ID of the author you're moving posts to, and the second is their current author. The posts table prefix would need to be changed if other than the default (wp_) is used.

  3. graemep
    Posted 11 years ago #

    Thanks, I phrased the question badly (what I should have said "if I delete a user, what happens to that user's posts). In spite of that your answer tells me what I need.

    Either of your suggestions would do what I want, so I suppose I should go for reducing the user level and avoid unnecessary mucking about with the database.

Topic Closed

This topic has been closed to new replies.

About this Topic