I want to run an installation of MediaWiki as a Internet-accessible personal wiki, running on wiki.mysite.com. However, I want to ensure that I am the only one who can read and write to this wiki. In the future, I may explicitly give other people read and/or read/write access, so the method of securing the wiki should account for that as well.

I see two options: I can use some MediaWiki plugin or I can secure the subdomain with HTTP authentication. However, I'm not sure what the advantages and disadvantages of either are in the long run. Suggestions or advice as to what plugins or authentication methods might be most reliable?

  • Also, let me know if this is the wrong place. I was torn between here and Web Apps, but since this is about administrating a wiki, I figure that's something more towards the domain of a webmaster. Commented Aug 24, 2010 at 22:09
  • that's why we've set up WikiSpeedia: area51.stackexchange.com/proposals/13716/wikispeedia Commented Dec 26, 2010 at 16:43
  • If you are only planning on editing this yourself, MediaWiki is an unnecessarily "heavy" package for such a goal. If I were in your position I would think long and hard about whether or not I ever planned on giving other users write privileges. If not, I'd go with a simpler CMS, possibly one I wrote myself. MediaWiki's strength is in allowing multiple users to edit, and tracking changes, etc. It does this for a tradeoff of some increased security risks and complexity of installation, setup, and administration. The most secure option here is not to use MediaWiki unless necessary.
    – cazort
    Commented Aug 10, 2021 at 18:46

2 Answers 2


I've used MediaWiki as a CMS on quite a few occasions, though my goal has been to publish (i.e. allow anyone else to view and only editors access to write) content but restrict edit access.

To lock down write privileges:

$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['editpage'] = false;
$wgGroupPermissions['*']['edittalk'] = false;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['createtalk'] = false;

$wgGroupPermissions['sysop']['createaccount'] = true;
$wgGroupPermissions['sysop']['edit'] = true;
$wgGroupPermissions['sysop']['editpage'] = true;
$wgGroupPermissions['sysop']['edittalk'] = true;
$wgGroupPermissions['sysop']['createpage'] = true;
$wgGroupPermissions['sysop']['createtalk'] = true;

... and allow use of raw HTML (highly desirable if you're using MW to publish):

$wgRawHtml = true;

Using basic user authentication supported by your webserver sounds like a reasonable way to prevent unauthorized parties from reading the content of your wiki, though there is probably no need to prevent people who are already authenticated from writing on your wiki (unless you have three tiers of privilege - i.e. no-read,no-write/read,no-write/read,write).

Edit: For long-term use (and if you need to support a growing number of users' privileges) I think you'd be best-served to find a plugin which supports exactly what you're trying to do and/or customize your MW installation to handle user authentication for reading in addition to write access.

Note that many of the existing MW plugins intended to prevent read access on specific pages have been plagued with "bugs" (i.e. a user could use the MW Export functionality to see the content of the page) because MW itself was never intended to include the feature in question - if you're hosting stuff no one else should see, you'll likely need to lock a lot of things down.

One site you might be interested in would be mwusers.com - plenty of relevant discussion (including experience w/various strategies and plugins) there.

Can you elaborate on the permissions that MW has built in?

Bureaucrats (can promote user to sysop) > Sysops (can protect and import pages, can ban users) > Users (can read, write, and edit on default installation)

Check out the Help:Sysops and permissions page at MediaWiki.org for further details on the default functionality and Manual:User rights for built-in MW configuration options.

  • It's been a while since I used MediaWiki from an administrators point of view - I'm going to be throwing it up on my server soon, but can you elaborate on the permissions that MW has built in? Commented Aug 25, 2010 at 23:03
  • Thanks. I think this addresses all of my concerns. Once I get the installation up and secured, if this indeed answers my questions, I'll be accepting this answer. Commented Aug 26, 2010 at 9:13
  • This is a very helpful answer. I've recently been tasked with maintaining a MW portal on an intranet and had questions similar to the OP's.
    – Tim Post
    Commented Aug 26, 2010 at 10:41
  • Allowing raw HTML introduces serious security risks, most notably XSS attacks. The stakes get much higher if any editor's account is compromised. MW has had some security vulnerabilities in the past that have led to ways an attacker could gain access without knowing a user's password, but even without this, if there are multiple editors your system is only as secure as the behavior of the weakest link; if any one of them has their password compromised, your wiki is compromised. For this reason I leave raw HTML disabled. It reduces the potential for damage in that case.
    – cazort
    Commented Aug 10, 2021 at 18:41

I found Lockdown works really well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.