Manual:$wgSaveDeletedFiles

Details
By default deleted files are files on a HDD that are marked with a certain binary number that when deletion happens this binary number is removed.

To save them and make it possible to undelete images, create a directory which is writable to the web server but is not exposed to the Internet.

Set $wgSaveDeletedFiles to true and set up the save path in $wgFileStore['deleted']['directory'].

The default settings are:
 * $wgSaveDeletedFiles = false
 * $wgFileStore['deleted']['directory'] = null

Note that these defaults disable all support for undeletion.