iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
LocalSettings.php is stored on the server in the MediaWiki installation root—the same directory that contains includes/, skins/, and api.php. It is not a wiki page and cannot be found through MediaWiki’s normal search. If you do not know the path, search the server with find / -iname LocalSettings.php -print, then confirm which result belongs to the active deployment.
The default LocalSettings.php location
A normal MediaWiki installation places LocalSettings.php in the top-level directory where MediaWiki was installed. Administrators often call this directory the installation root or installation path. It is the parent directory of core folders such as includes/ and skins/, and it contains files such as api.php.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The official MediaWiki manual describes the location this way: “The file must be located in the folder you installed MediaWiki into, on the same level with folders like includes/ and skins/ and files like api.php.” That directory, rather than a fixed operating-system path, is the reliable answer for a standard installation.
For example, if your MediaWiki files are under a directory named /srv/www/wiki, the expected file is /srv/www/wiki/LocalSettings.php. The directory name is only an example; the important test is whether the file sits beside the MediaWiki core directories and files.
#1 Best Overall
How to recognize the MediaWiki installation root
Start from the directory that serves the wiki or contains the extracted MediaWiki archive. You have found the root when its contents include several recognizable MediaWiki entries:
includes/skins/api.php- the rest of the MediaWiki core files and directories
LocalSettings.php belongs at this same level in the usual layout. It is a PHP configuration file read by the running application, not a page stored in the wiki database. Consequently, looking in Special:AllPages, the MediaWiki search box, or a page export will not locate it.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteIf the site is working but you cannot see the file in the directory you are browsing, you may be looking at a document root that differs from the application root, a package-managed layout, or a deployment that deliberately stores configuration elsewhere.
Find the file from a shell
When the installation path is unknown, log in to the server with an account that can read the relevant directories and run:
find / -iname LocalSettings.php -print
This searches from the filesystem root and prints every matching path. The option is case-insensitive, so it also finds a file whose capitalization differs from the conventional spelling.
Rank #2
Reduce noise and permission errors
A search beginning at / can traverse unrelated applications, mounted volumes, backups, and user directories. It can also produce permission-denied messages. If you know the likely web or application parent directory, start the same command there instead of at the filesystem root. A narrower starting point is faster and makes it easier to identify the active copy.
Seeing a permission error does not prove that the file is missing. It means the account running find could not inspect one of the directories. Use an administrative account appropriate to your server policy, or search a directory that your account can read. Do not loosen the configuration file’s permissions merely to make a search easier.
Evaluate multiple matches
More than one result can be legitimate. A server may contain an old test wiki, a backup, a second farm, or a previous release alongside the live installation. Match each result against the directory immediately around it:
- Does the parent directory contain
includes/,skins/, andapi.php? - Is that directory the one used by the web application or command-line maintenance jobs?
- Does the deployment configuration or startup script identify that directory as the active MediaWiki installation?
The first result printed by find is not automatically the correct one. The active deployment is the copy that matters.
Locations associated with different installation methods
The installation method affects the path you should expect, even though the file’s purpose is the same.
Web-based configuration
MediaWiki’s web configuration script generates LocalSettings.php for download. After downloading it, copy the file into the MediaWiki base directory—the directory containing includes/, skins/, and api.php—before using the wiki. Leaving the downloaded file in a workstation’s Downloads folder does not configure the server.
Command-line installation
The command-line installer writes LocalSettings.php to the installation root by default. If you accepted the default configuration location, inspect that root first. The installer also supports a custom configuration path through --confpath; in that case, the file is intentionally outside the usual root.
Debian or Ubuntu packages
For the documented Debian/Ubuntu package layout, the usual path is:
/var/lib/mediawiki/LocalSettings.php
This is a distribution convention, not a universal MediaWiki rule. A source-archive installation, container image, managed host, or locally modified package can use another path. Treat the package path as the first place to check on those distributions, then verify that it is the configuration used by the running site.
Free tools Windows power users keep installed
One-click scans. No signup required.
Containers, managed hosting, and wiki farms
Containerized deployments, managed hosts, and wiki farms commonly separate application code from configuration or generate paths through startup logic. The exact location is deployment-specific. Check the deployment configuration and startup scripts, and look for a documented --confpath value or equivalent setting. If the environment mounts configuration as a volume or secret, the file may be present in the running container or host filesystem rather than in the directory visible through a hosting control panel.
Rank #4
When a farm runs several wikis, do not assume that a similarly named file belongs to the site you are troubleshooting. Identify the application root and configuration mapping for the specific wiki instance.
What to do after installation
If you have just completed setup, use this sequence to place the file correctly:
- Identify the MediaWiki installation root by locating the directory containing
includes/,skins/, andapi.php. - Obtain the
LocalSettings.phpgenerated by the web configuration script, or note the path written by the command-line installer. - If the CLI installer was given
--confpath, use that specified destination instead of assuming the root. - Copy the file into the configured location on the server before loading the wiki.
- Confirm that the account used by the web application can read the file while unauthorized users cannot.
A correctly placed file is still subject to the deployment’s configuration. If the site reports that configuration is missing, check the path expected by the startup or web-server integration rather than creating a second copy at random.
Troubleshooting “I can’t find LocalSettings.php”
The wiki is running, but the file is not in the web directory
First, establish whether the directory you opened is the actual MediaWiki root. A document root can point to a subdirectory, while the application and its configuration live elsewhere. Use the neighboring-file test and the server-side search, then inspect deployment configuration or startup scripts if the result is outside the directory you expected.
The search returns no result
Check that you searched the server hosting the active wiki, not a local computer or a different container. Confirm the capitalization-insensitive command was entered exactly, and consider whether the file is supplied through a mounted configuration volume or a custom --confpath. If the wiki truly functions, a configuration file exists somewhere in the active deployment; the issue is usually the search scope, permissions, or an incorrect host.
Best Value
The result is under an old release or backup directory
Compare the surrounding files and deployment references. An archived copy can look complete because it contains the same MediaWiki folders. Select the path referenced by the live application, not the newest timestamp or the shortest pathname.
You installed from a package but expected a source-tree path
Package layouts can place the file under a distribution-managed directory such as /var/lib/mediawiki. Follow the package’s documented layout and verify the active service configuration. Do not move the file solely because it is not beside files from a source archive you have seen elsewhere.
Recommended Free Tools
Protect the file once you locate it
LocalSettings.php commonly contains database credentials and other sensitive settings. It must not be exposed through the web server, uploaded to a public repository, or pasted into a public issue report. Anyone who obtains those values may gain access to the wiki’s database or other connected services.
- Keep the file outside any location where the web server could serve its raw PHP source as a downloadable document.
- Use restrictive permissions appropriate for the administrator and web-server accounts.
- Allow the running application to read the file without granting broad read or write access to unrelated users.
- When sharing diagnostics, remove credentials, keys, tokens, and private connection details.
The official configuration guidance recommends stringent permissions. The exact owner and mode depend on how your operating system and web service run, so apply the least access needed by the administrator and application accounts.
A practical verification checklist
Before editing or moving the file, verify all of the following:
- You are on the server or container that runs the active wiki.
- The parent directory contains MediaWiki markers such as
includes/,skins/, andapi.php, unless a documented custom layout applies. - The path agrees with the installer configuration, package layout, or deployment startup settings.
- No
--confpathoption or equivalent configuration redirects the file elsewhere. - The file is readable by the application account and protected from unauthorized users.
- You have not selected a backup, test wiki, or inactive container merely because it appeared in the search results.
These checks distinguish the conventional installation-root location from deliberate exceptions and help prevent editing the wrong configuration.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Bottom line
Look for LocalSettings.php in the MediaWiki installation root, beside includes/, skins/, and api.php. On Debian or Ubuntu packages, check /var/lib/mediawiki/LocalSettings.php first. If it is still unclear, run find / -iname LocalSettings.php -print, then use deployment configuration and startup scripts to identify the active result. A custom --confpath can move the file, and its database credentials require restrictive permissions and careful handling.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

