Manual talk:LocalSettings.php

Basic question *HOW* to edit!?
It's assumed here, in the documentation of LocalSettings.php, that the readers knows where this file is.

It would be kinda helpful if the documentation told me that.

You might thing that "gee, if you need to edit LocalSettings then surely you know where it was installed." But that is not the case. In my case (just as one example) I have had a mediawiki installed for me on a hosted server.

Now the first thing I want to do is change $wgLogo. It's proving hard to do...


 * How to change $wgLogo:
 * you have to edit the file LocalSettings.php which will be in the main directory of you wiki-installation
 * always good to do: copy the original LocalSettings.php to LocalSettings.php.backup (just in case)
 * change the value of $wgLogo
 * activate the changes (just hitting the refresh-button doesn't help always. Probably depending on the browser settings...)
 * hit the refresh-button in you browser. You might also have to delete the cache to make the changes visible!

I have a question: I'm on my wiki. How can i reach the file and what i need to do to edit it? -20eric06


 * LocalSettings.php is not editable from the wiki (probably because this would create massive security risks). To edit this kind of file, you need a way to edit files on your server's file system. Evidently, the authors of the LocalSettings.php help assume the reader is the same person who installed MediaWiki on a given server. If you have the skills to get through Help:Installation, then you have the skills to edit any of the setup files such as LocalSettings.php. Obviously this assumption fails for the potentially large class of MediaWiki sysops who hired a Web hosting service to install MediaWiki for them. If you hired someone else to install MediaWiki for you, then you are left with no obvious way to get at LocalSettings.php, that is if you rely on the MediaWiki documentation as your only information source.
 * The situation is not entirely hopeless, because every Web hosting service must provide some way for the customer to change files on the server. To find out the method(s) you can use, contact your Web hosting service or look on their Web site for documentation. The details will vary from one service to another, but every hosting service customer needs to change files on the server, somehow, so any competent service will tell you how they let you do this. Here are some methods your service might use:
 * Web content management system
 * Unix shell login, via telnet, ssh, etc., and then you use a text editor running on the server (such as the newbie-hostile vi or emacs) to edit files there. This method might be common for servers running a LAMP software bundle.
 * The service might let you download files via ftp (or rsync, FileZilla, etc.), edit them locally with some editor such as Notepad, and upload them back to the server.
 * The service might charge you a fee and edit files on their server for you.
 * Note: something like my explanation above probably belongs in a help page here aimed at MediaWiki sysops who had a Web hosting service install MediaWiki for them. &mdash; Teratornis 17:39, 7 September 2006 (UTC)


 * If you hire a Web hosting service to install MediaWiki for you, you might benefit from also installing MediaWiki on your own Windows computer, so you can experiment with customizing it. It would probably be cheaper to prototype with your own MediaWiki install, where you won't be getting billed by the hour; then when you know exactly what to change, you can contact your Web hosting service to see about making the same changes on their server. If you learn what is going on behind the wiki interface, things like LocalSettings.php will make more sense. Teratornis 20:27, 7 September 2006 (UTC)

help
How can i get to "My LocalSettings.php"?--w:User:the editor1

Location and rights
I have two LocalSettings.php -files, one located at ./ and another at ./includes/. Which one's the one to edit? Furthermore, what rights should the file have? At the moment, no changes I make result in any changes. The mode is at 660 (I don't have the rights to change the mode). Thanks for any answers 193.229.103.232 09:25, 16 May 2006 (UTC)

WTF
How do I edit LocalSettings.php? My Wiki's address is http://smashbros.elwiki.com/ (there's no "wiki" in articles, so an article would be at smashbros.elwiki.com/Main_Page). The question is: where is that file? --Smiddle 213.64.166.76
 * You should ask ElWiki themselves. There's an e-mail address on their front page, elwiki AT Zone-MR DOT NET; alternatively there may be some kind of support tool when you're logged into the site. I don't know, I'm afraid; I'm not registered on that site. RichF 16:34, 21 August 2006 (UTC)
 * I tried to enter smashbros.elwiki.com/LocalSettings.php, and I get the following message:
 * "This file is part of MediaWiki and is not a valid entry point"
 * I try to edit it, smashbros.elwiki.com/LocalSettings.php&action=edit, and I'm only editing a regular article called LocalSettings.php.
 * Edit: I tried /includes/LocalSettings.php, and it redirects me to an article called 403.shtml. I can just say one thing: I'M A NOOB --Smiddle 19:43, 1 September 2006 (UTC)
 * LocalSettings.php is a file on the filesystem that you need to edit. It's not a wiki article, or something you can edit through the wiki site itself. You need to be able to modify the file on the server itself. I don't know if ElWiki allow you to edit LocalSettings.php, and if they do, I don't know how. You will need to e-mail the people who run the site. Sorry. RichF 19:49, 1 September 2006 (UTC)
 * oh snap. I'll try that then. --Smiddle 19:52, 2 September 2006 (UTC)

Found Localsettings.php but cannot edit
I found locasettings.php at /wikis/config it was one of only three files in the folder. However, I am unable to edit it as it says it "Could not load LocalSettings.php. File not found". So I don't know where to go from there... I have created some wikis with no issue, however I can not change the source for the logo nor ad adsense code. Please help!!

``` Grant Beehler

Contact directly at [mailto:grant@grantbeehler.net Grant@GrantBeehler.net]

Where is this file?
I believe that if I find the LocalSettings.php file, I can translate all of the namespaces (currently in English) into my language wikipedia.

Unfortunately, no matter what I try, I cannot seem to locate this file.

I notice that many other people have asked this same question, but I have not found any answer.


 * See my comments above in Basic question *HOW* to edit!?. It sounds like you don't have access to the file system on the server that hosts your MediaWiki software. If you did, and if your server runs a Unix-like OS (which I believe is true for all the language Wikipedias), you could probably find your LocalSettings.php with a  command like this:
 * If you need to prototype some complicated MediaWiki setup, you may be better off installing your own MediaWiki to practice with, and then when you know exactly what you want to change, contact your Web hosting service (which in this case sounds like it would be the system administrators for your language Wikipedia, that is, the people who have file system access to the servers rather than merely administrator access through the wiki interface). &mdash; Teratornis 03:42, 8 September 2006 (UTC)
 * If you need to prototype some complicated MediaWiki setup, you may be better off installing your own MediaWiki to practice with, and then when you know exactly what you want to change, contact your Web hosting service (which in this case sounds like it would be the system administrators for your language Wikipedia, that is, the people who have file system access to the servers rather than merely administrator access through the wiki interface). &mdash; Teratornis 03:42, 8 September 2006 (UTC)

What do I have to do? The rest of the interface is mostly translated, only the namespaces are still in English. Thanks for anyone who can help. Codex Sinaiticus 07:10, 27 August 2006 (UTC)


 * Translated text, including namespace names, can be found in the  files. Usually, if Wikipedia has been translated into a particular language, the namespaces will have been done at the same time. Which language are you translating into? RichF 22:06, 29 August 2006 (UTC)


 * I am the one who did the interface translation into Amharic myself, by modifying the Mediawiki files on that wikipedia over the past year as admin. But there is no way I can change the namespaces myself, that I know of.
 * Not via the wiki interface. You, or the people who run the server(s) that host the wikipedia you are describing, have to edit the LocalSettings.php file via the server's file system. Teratornis 03:42, 8 September 2006 (UTC)
 * On a related note, on the preferences, "amharic" (am) shows up as a choice for the interface only on the Amharic wikipedia.. It would be amazingly cool if this choice could be added with all the other languages for the other wikipedias, so that the Amharic interface I have designed could be used with any language wikipedia. Most of the small languages that are already available for interface on all the wikipedias in the preference section, are not even translated at all yet, and end up being English by default. Can you put a "bug" in some developer's ear about that?  Thanks Codex Sinaiticus 15:30, 31 August 2006 (UTC)
 * Below is an excerpt from, which is the French translation. This part of the file is providing French text for the namespaces. I haven't done a translation myself, but looking at this file, it does seem to be possible, and editing the   file seems to be the way to do it. RichF 19:52, 1 September 2006 (UTC)

/* private */ $wgNamespaceNamesFr = array(       NS_MEDIA                        => "Media",        NS_SPECIAL                      => "Special",        NS_MAIN                         => "",        NS_TALK                         => "Discuter",        NS_USER                         => "Utilisateur", ...several more lines like these...        NS_HELP_TALK            => "Discussion_Aide",        NS_CATEGORY                     => "Catégorie",        NS_CATEGORY_TALK        => "Discussion_Catégorie" ) + $wgNamespaceNamesEn;

!!!H E L P!!!

Is it me or is this question simply *not* getting answered? Or maybe I'm in the Twilight Zone!!! I'm running *my own* MediaWiki install on *my own* Linux box and have access to everthing; everything, that is, EXCEPT 'LocalSettings.php'!!! Why? Because I can't find it either!!! I installed MediaWiki into username/public_html/wiki like a good boy. This is the 'main directory' referred to above. And it's *not* there!!! Did the find / -iname 'LocalSettings.php' -print thing too. Negatory maximus... Can someone please tell me where this @!#$ file is? I'm not too proud for a 'LocalSettings.php For Dummies'!!!


 * The LocalSettings.php file is created by the installer. Run the installer: visit your wiki with your browser (at http://localhost/wiki or whatever) and follow the instructions. When you are through, the last step is to move the freshly generated LocalSSettings.php to the right location, to make it go live. You can edit it before or after moving, as you like. -- Duesentrieb ⇌ 22:14, 9 May 2007 (UTC)

KenPem -- I'm also running MW on my own Linux box, and there's no tract of this file. Very odd, as I assume (please correct me if wrong) that the Wiki won't work without it. Should I just create one?

Editing LocalSettings.php
Can it only be edited by the site owner or can Sysops edit this as well, I ask because I am a Sysop on a wiki that seems to have been deserted by its creator 62.136.176.133 20:48, 15 October 2007 (UTC)


 * It's a file. You need direct access to the files on the webserver to edit it. -- Duesentrieb ⇌ 21:56, 16 October 2007 (UTC)

I downloaded a MediaWiki and started one on a webhost (with FTP and everything if that helps). I successfully installed it and I want to access LocalSettings.php, but there are no instructions on how to access it to edit it. I went to the file manager and went to it, but it says "This file is part of MediaWiki and is not a valid entry point." Can someone help me access it? I want to change the logo. Thanks, 24.121.73.22 00:33, 11 December 2007 (UTC)
 * Uh, help? 24.121.73.22 03:03, 13 December 2007 (UTC)
 * A good place to get help is Project:Support desk.
 * Anyway... it's a file, you would edit it like any file - how that is, depends entirely on how you generally access files, i.e. what exactly "FTP and everything" means (FTP is old and sucks, SSH would be good, but is not available for typical cheap-o webspace).
 * Anyway, if you get "This file is part of MediaWiki and is not a valid entry point" you are trying to view the file through the web server, executing the php. Which is not what you want. You probably want to download it, modify it, and then upload it again. How this is to be done, depends on whatever your "file manager" is. Ask your hosting people. -- Duesentrieb ⇌ 14:04, 13 December 2007 (UTC)
 * Thank you. 24.121.73.22 09:09, 16 December 2007 (UTC)

I have a problem. I want to open up access for uploading files to my wiki. But I do not have to edit LocalSettings.php. If someone can send me to e-mail armi1984@mail.ru LocalSettings.php where I can see what needs to be changed and how. Thank you.80.250.159.240 20:20, 16 January 2009 (UTC)

Back It Up
Make sure you back this file up. I recently had a power failure while uploading a modified version resulting in a 0 byte LocalSettings.php both local and remote. The only way I could find to restore the file was to reinstall the wiki and try to remember what had been changed.

Latex Equations
I believe there are some missing steps in the Latex equations enabling instructions in this page.

I have miktex intalled and latex is in the path. I edited LocalSettings as explained but I still receive the message: Failed to parse (Missing texvc executable; please see math/README to configure.)

I have seen the file but still could not make it work. I think I should have texvc executable in the math directory, but I could not make "Make" works. Is there any texvc.exe already compiled for windows? --Fredguth 18:59, 7 July 2006 (UTC)

Thumbnails
Isn't $wgUseImageResize = true; also required for thumbnails? Is ImageMagick required or can MediaWiki's internal thumbnailer also be used? 203.117.95.42 06:43, 22 Jul 2004 (UTC)

Language
''The wgEmergencyContact variable is the e-mail address of the user to contact if something goes wrong. This e-mail address is used to send internal bug reports to. As an administrator, you want to include your e-mail address here.''

Linking to an external file
Is it possible to Link to a file on an external device? Like file:\\\myserver.org\MyDocs\Letter.doc ?

(Newbie) 09 Jun 2005

yes -add file: protocol to the supported list in localSettings.php (the list definition may need to be copied from defaultSettings.php - never edit defaultSettings.php!) - bk

One user-db for multi mediaWiki's?
Hello, I will install multi mediaWiki's on my homepage, but i don't like that, the user must be regisrie/login of all my wiki's. How can/must be chance the LocalSettings.php to use one 'user'-DB?

I know/think must use
 * a one mySQL-IP (???.???.???.???)
 * a one mySQL-DataBase-Name (DB????)
 * a one mySQL-DataBase-Tabel for the user-name/-password ('user')
 * and for all wikis must set a prefix ('en_????', 'de_????', and so....)

Ok, but now? what must chance for all wikis? to use the 'user'-tabel in all wikis? How chance the prefix for 'user'-DB from 'en_user', 'de_user', ..... -> TO -> 'user' without a prefix for the 'user'-DB ?

Please can you write me onto my page discussion-page.

Thanks --FireDragon 21:03, 10 Jun 2005 (UTC)

OK, I have found http://meta.wikimedia.org/wiki/Single_login/IMSoP Now I have tempted to set the $wgSharedDB var in the LocalSettings.php, but I've got a mistake: ...(SQL query hidden)... Function "User::idFromName". MySQL ... Table 'db2000.de_user' doesn't exist (localhost)". Thats right, because I have rename the tabel 'de_user' to 'user'  In the DefaultSettings.php is: > $wgSharedDB = null; < and I write in the LocalSettings.php > $wgSharedDB = "user" or $wgSharedDB = array('user')  Please can anybody help me? I don't understand the var setting --FireDragon 10:46, 12 Jun 2005 (UTC)


 * Oki, I think I have found a Bug for this problem! see more on my user-page or Bug2396 at http://bugzilla.wikimedia.org/show_bug.cgi?id=2396  --FireDragon 21:05, 12 Jun 2005 (UTC)

Installation Error
I am a total newbie trying to implement my first installation of MediaWiki. When I run the installer by pointing to the config folder I almost get an installation. But, I get the following output and have no idea where to go frem here or even if I am posting this at the right place in the right way. Here is the output and I am hoping someone can help me complete this installation:


 * 1) PHP 4.3.11: ok
 * 2) Warning: PHP's register_globals option is enabled. MediaWiki will work correctly, but this setting increases your exposure to potential security vulnerabilities in PHP-based software running on your server. You should disable it if you are able.
 * 3) PHP server API is apache; ok, using pretty URLs (index.php/Page_Title)
 * 4) Have XML / Latin1-UTF-8 conversion support.
 * 5) PHP is configured with no memory_limit.
 * 6) Have zlib support; enabling output compression.
 * 7) Turck MMCache not installed, can't use object caching functions
 * 8) Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
 * 9) Found GD graphics library built-in.
 * 10) Installation directory: /mounted-storage/home5/sub004/sc12824-RFHO/www/freeflow/FFWiki
 * 11) Script URI path: /FFWiki

Fatal error: Undefined class name 'title' in /mounted-storage/home5/sub004/sc12824-RFHO/www/freeflow/FFWiki/includes/Setup.php on line 370

Logo
The Logo section says to use the relative URL, however I had to use the full canonical URL... What gives?

$wgLogo = "$wgStylePath/common/images/wiki.png"; Should be: $wgLogo = "{$wgStylePath}/common/images/wiki.png"; and you need to define $wgStylePath not as "/var/www/html/wiki/skins/" (or whatever, that's the path from / on my machine), but as the URL path (and thanks to YOUR clue, whoever you are, I found that): $wgStylePath = "/wiki/skins/" This works like a charm for me, so I'm going to edit the Manual:LocalSettings.php so others with no previous knowledge of mediawiki setup will not be lead astray the way I was. Cheers!
 *  did you have to use the full URL? Maybe you were having the same problem I was... I think:

-Tzf 02:02, 2 November 2007 (UTC)


 * Well, Tzf, I'm glad it works so well for you . Though I've been a wiki admin for quite a while, I never needed more than the old wikimedia interfaces before. Now my duties in developing a new wiki involve working with LocalSettings.php, and that setting sure screwed me up. I'm not touching the article because I know that I don't know enough to do it. Ever call in to tech support with a problem and hear "Well, it works all right on my machine"? -- Thnidu 19:02, 22 July 2009 (UTC)

Renaming site:Changing $wgsitename
I need to change $wgSitename var in the LocalSettings.php since is started with "MyWiki", but i created documents such as "MyWikipedia". If I change $wgSitename to "MyWikipedia", then all the articles starting with "MyWikipedia" disappear. I want to move the "MyWikipedia" to it's own name space - essentially the sitename. Help... :-) I have a bunch of documents with the namespace of "MyWikipedia:" that want to use as the site/project name.  I'm using MediaWiki 1.5.5.  -Mitch 21:20, 12 January 2006 (UTC)
 * I have a similar problem but maybe a bit trickier. My site's in German, I'd like to change the site's name to something that contains an Umlaut. Doing this in LocalSettings.php I end up with funny characters on the screen, as described elsewhere. (If anybody has a solution to this I'd be very happy.) Additionally, part of the pages disappear as Mitch describes. My approach would be to create a database dump and then reinstall the wiki with a new name, then import the dump. I havent tried it yet because I'd like to find a more elegant way to do this. Any hints? --84.151.189.28 02:40, 21 January 2006 (UTC)

rebuildMessages.php
Is there a possibility to use rebuildMessages.php with the browser? Changing messages was easier before... --Edi Goetschel 22:33, 11 November 2006 (UTC)


 * If done it with a re-installation of the Wiki... a bit clunky. --Edi Goetschel 22:52, 11 November 2006 (UTC)

Enabling subpages
This article isn't very specific about what should userd change in order to enable the subpages.

Should I copy paste the syntax $wgNamespacesWithSubpages[NS_MAIN] = 1; into LocalSettings.php? --T-man 21:03, 15 November 2006 (UTC) $wgNamespacesWithSubpages[NS_MAIN] = true; &mdash; MrDolomite | Talk 21:16, 15 November 2006 (UTC)
 * Yes, that's the right way, T-man. See Sub-page for the list of namespace name abbreviations to use when adding lines similar to the one below in your   file.

Enabling subpages for all namespaces
Is this correct: $wgNamespacesWithSubpages = array_fill(0, 200, true);
 * 1) Enable subpages in all namespaces

I can't enable image uploads!!
I'm a total newbie at MediaWiki, and I want to allow me and my users to upload images. But it seems like I messed up my installation. I tried editing localsettings.php, but the following shows up:

To enable image uploads, make sure the 'images' directory ## is writable, then set this to true: $wgEnableUploads = true;Error, Setup.php must be included from the file scope, after DefaultSettings.php

Please help me with this...

Should I save Localsetting.php as utf8 encoding ?
If I want to use some ExtraNamespaces in Chinese, I have to save Localsetting.php with utf8 encoding. But sometimes some error will occur, for example, the setting in common.css page will be desable and some functions will become unstable.

When I save it with other encoding, like big5 encoding, the ExtraNamespaces in Chinese will be unable.

Now, I save Localsetting.php in English and insert a line like followed: require_once( "$IP/extensions/ExtraNamespace.php" ); The ExtraNamespace.php is a utf8 encoding file and the content of the file is the setting involved with ExtraNamespaces. Then all problems I've met will be solved.

Can I do it by this way? or I should not use any ExtraNamespaces in Chinese. But I've tried to set all ExtraNamespaces in English and change the file .\languages\messages\MessagesZh_tw.php, but I always failed. Perhaps I don't know how to edit the MessagesZh_tw.php. any ideas? --Roc michael 16:12, 13 July 2007 (UTC)
 * Mediawiki 1.9.2 and 1.9.3 in Chinese interface
 * OS windows server 2003
 * The AppServ Open Project - 2.5.7 for Windows
 * Apache Web Server Version 2.2.3
 * PHP Script Language Version 5.1.6
 * MySQL Database Version 5.0.24a
 * phpMyAdmin Database Manager Version 2.9.0.2

DON'T USE NOTEPAD TO EDIT LOCALSETTINGS!!!

$wgNamespacesWithSubpages[NS_MAIN] = 1;
With mediawiki-1.9.3 it is :

Please activate subpages in Esperanto Wikipedia mainspace. Thx ArnoLagrange (sysop and bureaucrat @ eo:WP ) 09:05, 17 November 2007 (UTC)
 * Activation on eo:WP


 * Please ask it on SPQRobin 12:05, 17 November 2007 (UTC)


 * After a request on my talk page, I submitted bug 12338. SPQRobin 12:26, 18 December 2007 (UTC)

Questions. Please message me on my userpage if you have the answers

 * 1) My first question was answered in the question directly above.
 * 2) How do you make it so that redirects are italicized?
 * 3) If the extra namespaces is set like this: $wgExtraNamespaces = array(100 => "Portal", 101 => "Portal_talk"); Then how do you figure out the code for the default, given namespaces? - This is impossible as there are no breaks in the numbers: Manual:Namespace.
 * 4) If I did add extra namespaces and I already had pages with that prefix would they be deleted? Like if I have a map called "Map:Krivoi Rog" and I add the "Map:" namespace will this page be deleted? - Answered and merged into article.

PatPeter 21:17, 9 October 2007 (UTC)

wgSpamRegex
This page of the manual ought to have a link to Manual:$wgSpamRegex, which is yet another setting in the LocalSettings.php file. (I would have already added it myself if the page wasn't locked). --DavidCary 23:08, 15 December 2007 (UTC)

Problem After Editing LocalSettings.php
On several occasions, I have have tried editing LocalSettings.php by adding "require_once" extensions toward the end (but before the >? characters). This was after uploading the correct php files to the correct directory. After saving, my wiki cannot load. There's no error message--there's just nothing there. It's blank. If I delete the line I added, the wiki comes back just fine. I've edited other variables and it's fine. Let me know if you have any suggestions for this issue. Thanks. Corsulian 01:01, 28 December 2007 (UTC)
 * Make sure that you are getting the correct variations of the Cite and ParserFunctions extension for your PHP version. I think Cite is fine, but the current version of ParserFunctions requires PHP 5 in order to run (and since you're running MediaWiki 1.6.10, I'm assuming you only have PHP 4). Try getting the other version of it and see if that works. And as for your logo, try changing $wgLogo to an absolute path to the image. --Skizzerz talk 15:14, 28 December 2007 (UTC)
 * Thank you. It does appear that I am stuck with PHP 4.  I'll see if that changes things.  As for the image, I am currently using the absolute path.  I'm a little concerned that I can't find any reference to these issues from anyone else.  I'm hoping that I'm not missing some enormous step in my configuration somewhere--I installed the wiki through one of those automated "here's a bunch of free programs you can use" modules through the admin panel that my host provides.  Corsulian 16:25, 28 December 2007 (UTC)
 * Ok, you're setting the wrong path to the logo, which is why it's not appearing. Try  instead (you were linking it to the image page, not the image itself). --Skizzerz talk 16:57, 28 December 2007 (UTC)
 * Thank you--fantastic. The logo is fixed and the ParserFunctions extension is installed.  I was expecting it to fix a few issues I had with the NavBox template but no such luck--I'll look into that more.  I haven't found a PHP4/5 differentiation with the Cite extension yet--the "blank" problem remains at least for now.  I'll continue looking into it--please, anyone, let me know in the meantime if you have specific experience with Cite.php and PHP4.  I'll look to the Cite.php discussion page for more details otherwise. Corsulian 21:40, 28 December 2007 (UTC)

Specific Details
**require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
 * MediaWiki 1.6.10
 * The two specific php lines I tried using:
 * require_once( "/extensions/Cite/Cite.php" );

Other, Possibly Related, Issues
*Unable to get my changed upper-left logo to appear. It is 135 pixels square and uploaded to the wiki itself with the path reflected in the LocalSettings.php. No logo at all is currently visible.

What has worked?
*I can upload files just fine.

Changes not taking effect
After editing and saving localsettings.php, none of my changes take effect. Am I missing some obvious (and unspecified!) step, such as stopping services before editing, or running a script after editing? If so, which service(s) need to be stopped and/or what script needs to be run? Bastun 10:23, 10 January 2008 (UTC)
 * No. All changes should take effect right away. Make sure you are not editing an unused copy, and that you put your changes near the end of the file. -- Duesentrieb ⇌ 14:05, 12 January 2008 (UTC)
 * Details of the issue are discussed at Project:Support_desk --Zven 18:42, 12 January 2008 (UTC)

Need a fresh copy created with Wiki
We need a default copy of LocalSettings.php placed at Manual:LocalSettings.php/Default. So that if users screw up something it it, they can easily revert. -PatPeter,  MediaWiki Support Team  19:56, 25 February 2008 (UTC)
 * But the "defaults" depend on all the values the user enters into the installation form.
 * The "real" defaults are in DefaultSettings.php. What is in LocalSettings.php really are local settings. So there is no default. -- Duesentrieb ⇌ 22:00, 25 February 2008 (UTC)
 * Alright then let me rephrase what I meant, since I thought what you said would be assumed. We need a copy of LocalSettings that gives all the defaults, and where things like email and whatnot are concerned have  or whatnot. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  02:10, 26 February 2008 (UTC)
 * If we destroy the LocalSettings.php file, is the Mediawiki projet recreate it ? Phd0 06:55, 21 January 2009 (UTC)

Editing LocalSettings.php has created an error I can't get rid of.
I recently edited LocalSettings.php. After saving the changes, I tried to access my wiki, but it gave me an error. After receiving the error, I took out the aforementioned change. Now my wiki gives me a completely different error: Warning: Cannot modify header information - headers already sent by (output started at /etc/mediawiki1.10/LocalSettings.php:2) in /usr/share/mediawiki1.10/includes/WebResponse.php on line 10 whenever I try to save a page. The wiki will also display the same error on any of the wiki pages, at the top, where the header would be. The pages are still visible, except when someone tries to edit a page.

A "default" copy of LocalSettings.php would be apreciated. I know there is no default exactly, but I just need something that I can compare to my copy of LocalSettings, so I can see what is different and fix it. I realize that site names and such would have to be different, but that's not what I need to see, I just need something that has all the same variables and variable assignments as LocalSettings would when first installed.

Solution

 * 1) Probably there's some empty line or character before the  --TheDevilOnLine 14:10, 8 May 2008 (UTC)
 * 2) * Remove all content (including spaces and empty lines) before the  and everything after it (if there's a ?> in your document)
 * 4) Also file was saved in encoding "UTF-8 with signature" --RazbakovAleksey 10:44, 4 March 2010 (UTC)
 * 5) * Open file in extended editor (like Notepad 2), chage encoding to "UTF-8" and save the file

Securing this file
Nowhere can I find instructions on the generally accepted way to secure LocalSettings.php. This file sits in my root directory and contains plaintext passwords. Do I just chmod 700? Is that the only level of security provided? It seems like an awfully big risk. If someone does know a generally recommended way to secure this file, it should be listed both on this page and on Manual:Installing MediaWiki. — Epastore 15:37, 28 May 2008 (UTC)
 * The php/web user needs to be able to access the password in order to contact that database. So, it can not be secured against access by that user. Encrpyting it in some way would just be obfuscation, since the means for decrypting would have to be available to that user too.
 * Since access by other users is prevented by the 700 access mode, I don't see a problem here. A second line of defense would be telling the database server to only accept connections from localhost or at least only the local lan. This is standard procedure and would prevent anattacker from accessing your database even if the password should be leaked.
 * I don't know, and can't think of, any other way for web applications to secure the passwords they used for accessing the databse. Its the same for a normal multiuser system: your database password sits in ~/.my.cnf as plain text and is protected against access by others only by the file's mode. -- Duesentrieb ⇌ 16:08, 28 May 2008 (UTC)
 * So is that what you do, just change the posix permissions? I am looking for some sort of generally accepted practice. What does Wikimedia do?
 * Relying only on posix permissions seems to mean that if the server happens to have a hole (such as a newly discovered hole in php or apache for which there is not yet a patch), then my site could be effectively rooted. The most common exploits I see are "escalated privileges," i.e., breaking posix permissions.
 * And shouldn't this security practice be documented somewhere? The default installation leaves the database password open to anyone who can browse to that file, does it not? Or does the .php suffix act as a basic level of security?
 * As for the user needing the permission... it also means that anyone with ftp to the mediawiki directory can see the database password. Sometimes people are given ftp without being given full reign over the database, are they not?
 * These are genuine questions... I am a newbie and would love to be proven wrong about any of the above. :) — Epastore 21:36, 28 May 2008 (UTC)
 * One thing that you can do is create and use a limited database user. Add a single purpose user that only has access to the wiki database and grant it select, insert, update and delete permissions. I'm going over to add a note about this to Manual:Config_script so that it's at least listed somewhere accessible. — IvoLucien 20:05, 31 May 2008

Blank wiki main page - subtly corrupted LocalSettings.php
Originally this entry would been about a "Wiki has a problem" message, but I quickly realized that I had changed the mysql password that MediaWiki needed. After updating the database password in LocalSettings.php, my MediaWiki started coming up completely blank. The web server didn't log any errors, so kept looking and I finally found this in phperror.log:

[31-May-2008 18:51:33] PHP Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in C:\www\wiki\LocalSettings.php on line 3 [31-May-2008 18:51:33] PHP Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in C:\www\wiki\LocalSettings.php on line 4 [31-May-2008 18:51:33] PHP Parse error: syntax error, unexpected T_STRING in C:\www\wiki\LocalSettings.php on line 4

The strange thing is that the file looked fine, no stray characters. It turns out that the Visual Grep editor that I'd used to edit the password had somehow corrupted the line endings. Opening it in a clean text editor (not notepad, metapad in my case) and saving over top of the file fixed it. I found references online to this sort of thing happening on Macs as well.

Or perhaps the file had gone stale and needed to be aired out. Regardless, good luck! - IvoLucien - 31-May-2008 19:36:44

How do I get my domain name to work?
I have an add on domain set up in my cpanel to point to the wiki directory inside my root directory. What do I need to do for newusconstitutionwiki.org to open when the domain name is typed. When I type in newusconstitutionwiki.org I get the following error:

The requested URL /constitutionwiki/index.php5 was not found on this server.

That is the correct name (constitutionwiki) for the directory I have the mediawiki files in!

This is the path I see in the address bar: http://newusconstitutionwiki.org/constitutionwiki/index.php5?title=Main_Page

The index.php5 file is there so what gives?

I have done searches and can't find anything that addresses this situation.

I am totally new to mediawiki!!

How to use interwiki images?
I want to use images on commons in my site. Is this possible. If yes how I can do that? -Redgwan 08:16, 23 August 2009 (UTC)
 * You should use Manual:Image_Administration. --Arseny1992 03:24, 28 November 2009 (UTC)

The Comment #UPO
Can anybody tell my what thet Comment want's to point out? I found it in multiple locations in the LocalSettings.php for example: $wgEnableUserEmail = true; # UPO I couldn't make sense of it. (and it probably is not important, since it is a comment) --153.96.161.212 16:13, 4 November 2009 (UTC)


 * It actually says what it means in the file: “UPO means: this is also a user preference option” --ucc 11:17, 11 November 2009 (UTC)

MyWiki

 * What can I do to fix this? I copied alot of the DefaultSettings.php into LocalSettings is that bad? 173.32.219.141 21:23, 12 January 2010 (UTC)


 * Install Extension:ParserFunctions -- Bryan ( talk|commons ) 22:02, 12 January 2010 (UTC)
 * Thank you Bryan it worked. :)173.32.219.141 10:10, 13 January 2010 (UTC)

What type of text editor to use?
It says, "Don't edit this file with Notepad or other text editor that adds byte order marks to files, or you will break your wiki." What is a better text editor to use? Metapad? Tisane 02:40, 24 February 2010 (UTC)
 * In reference to this edit, I understand the concern about advertising any particular software, but it would be a useful service to site administrators to provide some guidance as to what text editors are safe. Of course, we can't include a bunch of software names on the LocalSettings.php page, but maybe a link could be provided to a list of suitable and unsuitable text editors? Tisane 22:46, 1 March 2010 (UTC)
 * I wish they were more specific about what the problem is. I've used Notepad to edit LocalSettings.php for use on both windows and linux installations and have never had it create a problem. --Jerry Fallon 22:32, 13 October 2010 (UTC)

GNU Licence
A wiki i am setting up wishes to go under a GNU License, in order to prevent similar wikis at Wikia from stealing content. Is this advisable? if so, what settings do i need to set in order to run a GNU-licensed wiki? thanks Bud0011 18:29, 24 February 2010 (UTC).

Activating the code
How do you activate the code once you have configured it so that it works on wikis? Is there also a way to use this on non-wikimedia wikis, such as WiiBrew? Keyboard mouse 01:02, 18 June 2010 (UTC)

I want to remove the square brackets on edit links
I'd like to set my edit links to be denoted with CSS styling (which I have done: span.editsection {       -moz-border-radius: 2em;        -webkit-border-radius: 2em;        border-radius: 2em;        border: 1px solid white; } )

However the square brackets in the [edit] links makes this look terrible. I want them gone. I don't see a preference for this, and I cannot easily find where in what file adds these in. Any clues? 69.30.57.81 19:05, 1 July 2010 (UTC)