Manual:$wgTmpDirectory

Details
The path to the temporary directory. Used by  to control where temporary files MediaWiki needs are to be written to including:
 * Old and new tempfiles for external executable based external diff engines configured by
 * , used for chunked uploading, some transformations, and various parts of the file backend code.
 * UID Generator node and lock files.
 * Upload from URL
 * The directory which a places it's DBA database file. Can be overridden using.
 * Importing uploads from XML dumps

The path to the temporary directory. When using CACHE_DBA as your $wgMainCacheType, this allows you to select which directory is used.