March 3, 2017

Wordpress deleted user post recovery

Handy hint for anyone who has accidentally deleted stuff in WordPress. It happens even to the best of us.

In the midst of updating our website last night I inadvertently hit delete on an important user and lost all their related posts, including half the site pages. Not good. In a mild panic looking at Google turned up very little other than 'doh!', however I then noticed that the Trash bin in Wordpress was looking bigger than usual.

Luckily, turned out that deleting a user and their posts (at least in the current version of WP) means moving those posts/pages to the trash - not completely wiping them out. All I had to do was restore them from the trash. However, when doing that, they come back as draft pages/posts and require moving to public status before they reappear. 5 minutes of careful checking and it was all back in one piece.

Rule 1: Backup.

Rule 2: Don't delete stuff.

Rule 3: Check the trash.

Topics: Blog, deleted, Open source, recovery, Wordpress