Where Does MediaWiki Store Config and Uploads?
MediaWiki config is LocalSettings.php in the install root and uploads go to images. Debian based installs split config into etc.
Last updated
A MediaWiki install has two locations that matter. LocalSettings.php in the install root holds the whole configuration, generated by the web installer and copied to the server by hand. Uploaded files land in the images folder beside it, hashed into subfolders by default.
Package installs rearrange this. Debian and Ubuntu split the files across system directories, with the active LocalSettings.php expected in etc and the web readable tree under var lib. Custom upload paths set with wgUploadDirectory override the default in both layouts.
Where MediaWiki stores this, by platform
/var/www/mediawiki/LocalSettings.php
Main config file, created during setup. Never edit DefaultSettings.php. Override values here instead.
/var/www/mediawiki/images
Uploads, thumbnails, and temp files during upload. Keep the .htaccess inside it so uploaded scripts cannot execute.
/etc/mediawiki/LocalSettings.php
Debian and Ubuntu package layout. Core files are symlinked from usr share into var lib, and extensions go in the extensions folder there.
Frequently asked questions
Where is LocalSettings.php?
It is in the folder you installed into, next to api.php and the includes and skins folders. If the wiki loads, the file is there. Run find / -iname LocalSettings.php on the server to locate it.
Where are uploaded images stored?
Check the images folder under the install root, including archive, thumb, and temp inside it. Deleted files linger in archive until purged with the maintenance scripts.
Notice an outdated path? Let us know.