Where is localsettings.php?

Takyon

New member
Joined
Apr 10, 2023
Messages
3
Sorry, I'm a bit of a noob at this. I'm trying to add extensions to my mediawiki website, I remember doing this months ago and I believe it was through directadmin. I just don't know where I can even access that file so I can make edits. Thanks in advance guys.
 
Warning:Don't edit LocalSettings.php with document editors like Notepad on Windows 10 Version 1809 or earlier, TextEdit, or other text editors that add byte order marks to files. These break the PHP runtime of your wiki. Instead, use a code editor, e.g. Vim, Notepad++, or Atom. These handle file encodings properly.

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. If this file is not there, the wiki will not work at all—if the wiki does work, the file is there

 
Warning:Don't edit LocalSettings.php with document editors like Notepad on Windows 10 Version 1809 or earlier, TextEdit, or other text editors that add byte order marks to files. These break the PHP runtime of your wiki. Instead, use a code editor, e.g. Vim, Notepad++, or Atom. These handle file encodings properly.

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. If this file is not there, the wiki will not work at all—if the wiki does work, the file is there

I ended up finding localsettings.php in the file manager in direct admin, couldn't find it previously for some reason. I enabled an extension in that file then saved, now it won't open again and the wiki is down. What gives?
 
The file manager shows the /home/user location to begin with. After that, it doesn't know where to go. It would normally be located under /home/user/domains/domainofyourwiki.com/public_html
I'm sorry for not giving full details on that, I assumed you knew this part

Regarding the wiki, I can't exactly help you there as this is not my area of expertise. You might want to find errors in the log files. You can access this on SSH:

Code:
tail /var/log/httpd/domains/domainofyourwiki.com.error.log

You can edit the unopenable file using VIM in SSH too:

Code:
vim /home/user/domains/domainofyourwiki.com/public_html/LocalSettings.php

You may need to use chown to make the file accessible for other users/guests

Code:
cd /home/user/domains/domainofyourwiki.com/public_html/
chown -R user:user *
 
You may need to use chown to make the file accessible for other users/guests
This should never be necessary as it should be user:user by default in there, otherwise other settings are wrong or mod_php is used for some odd reason without mod_ruid2.

@Takyon I hope you have a DA license, since this forum is only for admin and reseller support, not for hosting customer support, you have to ask your hoster for that.
 
Last edited:
Back
Top