I am pretty sure we have all been there are some point in our careers. We accidentally, or even purposely, delete something important and then frantically try to figure out how to get it back all while praying that it is not gone for good. This very thing can happen in Kentico just as it does on your desktop or email client. The good news is that the same mechanisms that we use to recover items on those platforms are also available in Kentico.
If you have experienced the above drama, and even if you haven't, you are probably aware of the “Recycle Bin” or “Trash” concept. This is where deleted stuff goes until it is purged for good. It is also where you go to recover that important item you mistakenly threw away. Your operating system has it as does your email client though the name may be slightly different depending on the platform. Kentico has it too and calls it the
Recycle Bin.
When a page or document is deleted in Kentico, the user is asked whether or not they want to
destroy the page and its history.
It is my recommendation that you never choose to destroy a document unless you are absolutely sure you will never need it again. As I am confident you can guess, when you choose to destroy a document you are telling the system to delete it permanently. There is no way outside of a database backup to recover a page or document that has been destroyed. However, deleted documents that are not set to be destroyed are moved to the recycle bin and can be restored from there.
Restoring Documents
To restore a document, go to the
Recycle Bin module under the
Content Management section.

This action will display a filterable list of items that have previously been deleted. The default view is set to display items that have been deleted by your user, but depending on your permissions, you may be able to see and recover documents deleted by others. Once you locate the document you want to restore, just click the Restore icon next to it and then confirm that you want to restore it.
That's it! This simple action will restore the document at the same location it existed when it was deleted. If you need to restore multiple documents, you can select them in the list and then use the mass action drop-downs below the list to perform the restore to all of them at once.
Wrapping it Up!
Hopefully, this tip will save one or two of you from a panic attack the next time you delete something important. An important reminder that while the recycle bin is certainly a great feature it is not a replacement for a disaster recovery plan. Check with your developers to ensure your website has a good backup and recovery plan that will save you from critical data loss. Stay tuned for the next Kentico tip coming soon!