Manual:$wgFileStore

MediaWiki 1.11+
Deleted images are stored by default in "$wgUploadDirectory/deleted". $wgFileStore can be used to customize this:
 * "$wgFileStore['deleted']['directory']" is the directory where the files will be saved.
 * "$wgFileStore['deleted']['url']" should be null (it is the URL to access the files, but they are private).
 * "$wgFileStore['deleted']['hash']" is the number of subdirectories to create under the 'deleted' directory.

The default settings are:

Prior to MediaWiki 1.11
Prior to MediaWiki 1.11, deleted files are simply discarded by default; see $wgSaveDeletedFiles for how to enable storing them. To enable undeletion, the 'deleted directory' must be defined and wgSaveDeletedFiles must be true.

The default settings are:

An example enabling saving deleted images (along with $wgSaveDeletedFiles):

The 'deleted url' can remain null (as the deleted files are private, not visible to the Internet). The 'deleted hash' value is used to determine how many levels of subdirectories to be created under the 'deleted directory', default value is 3.