Many times people mistakenly delete posts. By default, WordPress doesn’t provides you any automatic backup functionality when deleting posts permanently or while moving them to trash folder.
Before deleting the posts is the new WordPress plugin that automatically backups the post before removing it from trash.
How it works? When a post is deleted from its edit screen or from Posts -> All Posts page, it is moved to ‘Trash’ section.
Now when you delete any post from the ‘Trash’ (by clicking ‘Delete Permanently’ button). The plugin will run and will save a backup of your post in wp-content/deleted_posts directory on your server.
All backups are saved as export XML files which you can be imported with default WordPress content import feature on Tools -> Import screen.
For importing a post: Access your website via FTP and navigate to root directory (public_html) -> wp-content -> deleted_posts directory.
Download the XML file, save it in your computer’s local drive and then visit your website’s admin area dashboard Tools -> Import page and import the downloaded XML file.
The automatic backup works for posts, pages and custom post types.