Update: For the latest version and up to date documentation, please see the project page.
I got a sudden overwhelming desire to have a wiki, so I decided to set up a MediaWiki installation alongside WordPress. By the time I’d installed it I’d forgotten why I wanted the wiki in the first place, so instead I started looking for a way to integrate the user authentication systems between the two.
Unfortunately, nothing particularly inspiring seemed to exist – just incremental improvements on previously abandoned attempts. The most up to date of those can be found here – it’s an authentication plugin for MediaWiki that looks up the user details directly in the WordPress database. I tried it out and it worked, but left a lot to be desired in terms of functionality so I decided to start from scratch and create my own solution that would leave different things to be desired.
Here’s a brief overview of what I’ve done so far:
- The main component is a MediaWiki authentication plugin that pulls in the relevant code from WordPress and lets that handle authentication rather than poking around in the database.
- Users that register on WordPress can use the same details to log in to MediaWiki and vice versa. The accounts are synchronised between the two databases, but authentication itself is delegated to WordPress.
- If you’re logged in to WordPress, you’re automatically logged in to MediaWiki, and if you log out of MediaWiki, you’re automatically logged out of WordPress. The other two possible combinations of those two statements aren’t true (yet).
I wasn’t sure pulling the WordPress codebase into the MediaWiki sessions was entirely a good idea – in fact, I was pleasantly surprised that it worked at all, and so far there have been only a few little issues to deal with. It definitely isn’t a good idea performance-wise though, but on the plus side it means that WordPress plugins will be respected, as will WordPress database changes.
So, I have this up and running, as you can see by the Wiki link above. Feel free to play around. Issues still to be resolved include:
- WordPress lets you register a username that is not valid on the Wiki.
- MediaWiki lets you omit the email address when registering, in which case you won’t be able to log in at the WordPress end.
If you’re brave enough to want to try it for yourself, take a look at the documentation.
Comments are now closed.