Jul 18 2010
HOWTO: Setup MediaWiki as a Single-user CMS
If, like me, you’re abusing MediaWiki as a content management system for your personal website, here are some suggested options to set in your LocalSettings.php:
#Stricter than normal settings: #prevent anonymous users from registering $wgGroupPermissions['*']['createaccount'] = false; #prevent anonymous users from editing $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['createpage'] = false; #disable section edit links for anonymous viewers $wgDefaultUserOptions['editsection'] = false; #remove userpage & usertalk links for anonymous $wgShowIPinHeader = false; #disable bot API $wgEnableAPI = false; $wgEnableWriteAPI = false; #disable RSS/atom change feeds $wgFeed = false; #Looser than normal settings: #disable 'nofollow' on external links $wgNoFollowLinks = false; #allow uploading of non-images $wgStrictFileExtensions = false; $wgCheckFileExtensions = false; $wgVerifyMimeType = false; #disable copyright checks on upload $wgCheckCopyrightUpload = false; #disable anti-vandalism patrols $wgUseNPPatrol = false; $wgUseRCPatrol = false; #allow raw HTML in <html>...</html> blocks $wgRawHtml = true; #allow more liberal redirecting $wgMaxRedirects = 42; $wgFixDoubleRedirects = true; #Other: #unless your site is multilingual.. $wgHideInterlanguageLinks = true; #unless you use the Universal Edit Button.. $wgUniversalEditButton = false;
And if you’re using the Monobook skin, add the following to /skins/monobook/main.css to hide the “talk” and “view source” tabs:
li#ca-talk {
display: none;
}
li#ca-viewsource {
display: none;
}
Note that this merely hides the links from view; they’re still in the HTML and are still accessible by anyone who knows how override your CSS or construct the URLs manually (i.e. mere security thru obscurity; I mainly do it to improve the wiki’s aesthetics).
Also, I’ve now finished switching hosting providers! (You may have noticed the site being flaky for a bit.) Rebertia is now proud to be hosted by prgmr.com. Their pricing for VPSes is quite good; I’m now paying less than I was for shared hosting at my previous provider. (Protip: Install Fail2ban and setup its SSH rule to avoid being 0wn3d; I’ve safely observed a surprising number of random SSH login attack attempts on my VPS)
Popularity: 2% [?]
One response so far
In the Quest of the Fragrant Harbour
Lacey Thoughts
League of Desmond
Thanks for the code!