No one can doubt the usefulness of Wiki. The vast majority of people who use the web/Internet know of Wikipedia as the single biggest use of Wiki. However, it is most certainly not the only use of Wiki. Wikis are important for creating knowledge bases of all sorts. The Arch Wiki is one of the most interesting ones out there with a massive knowledge base about how Linux works (actually, how Arch Linux works, but it stands true for most other distros as well). While there are projects like Read the Docs and GitBook, a wiki is a lot more flexible and you can decide the look, feel and user experience in terms of themes, navigation, layouts, responsiveness and other things.
I would say MediaWiki is not a choice for me. This thing is just too big, unless you are planning to create a massive knowledge base in which case, it is the recommended one. Wikipedia and the Arch Wiki are only there to testify. Installing MediaWiki might be easy for some but to configure this beast is an altogether different issue. You have to configure just too many things and before you begin, you probably will need to go through a few dozen pages to understand what those terms mean. If you have not already worked on an installation as a writer or editor, you would be in awe of the number of options it is going to throw at you. You are welcome to try and give me tips if you want but for most of what I do, I do not think I am going to need MediaWiki for coming future.
With MediaWiki out of the way, there are still a number of choices. The question is which one do you want? I haven’t worked on too many of those but I have seen a few. I have seen Confluence, Trac, MediaWiki, the famous GitHub Wiki, DokuWiki and I think one installation of MoinMoin and that’s about it. While there are many others, these are the most famous ones.
My favorite amongst the lot is DokuWiki. I do like the GitHub wiki for development projects but since this thing cannot be used on your own domain and has a (sometimes unwanted) sidebar with a list of pages all the time.
Now, why do I like DokuWiki? Simple – no databases. Normally, you would expect everything to be saved properly in a database and think about load, backups, data safety and security and a number other things. Well, fact is – the less the number of components, the better. We should actually increase the number of components in a system only if it serves a particular purpose and is really needed. For example – if you have one visitor every minute on your blog, then you probably do not want to enable memcache or redis cache for serving pages. Most blogging/CMS software can deal with that with reasonable speed and you would not lose points in SEO for being slow.
When it comes to Wiki, most of what a small to mid-size project would need from a Wiki is an ability to namespace versions, clean URLs, easy backups and restores, support for themes and most importantly, availability.
Just imagine – Wikipedia is down for an hour! It would be a catastrophe. A lot of students and researches would lose the point of reference. You will lose the single biggest collection of human knowledge and a lot of people who depend on it for their work or study will find considerable challenge finding references to things they need.
I have used and liked DokuWiki for reason more than one:
- It does not need databases. No MySQL, no PostgreSQL, no Redis or Cassandra. It instead uses text files stored directly on disk! I am already maintaining a few. It is a relaxation. If the web server is working okay, the wiki is working okay.
- Backing up a site running on DokuWiki is simple – you zip the folder of installation and the backup is there in the file. Unzip it to the DocumentRoot again to restore.
- Installation is breeze – unzip, open, configure and start writing. No need to remember gazillion options.
- If you want to backup only the content, you don’t need to fire up a database management tool, login and run a export, or run a dump command. Just take a copy of its data folder and you are done.
- To configure the security, you just have to make sure you abide by the rules of DokuWiki (like creating ACLs, having strong passwords etc.) and make sure your web server is secure enough. The rest is okay.
- Though Doku will have its own history for changes in files, you can git the data directory (with correct .gitignore rules) and have cron run a script to do ‘cd /path/to/data; git add .; git commit -m “backup”; git push origin master’ to any server.
- The syntax for writing the Wiki is very easy to learn. And I love the fact that I have a image uploader in the editing UI to upload, get the link and insert it in place. You don’t need to sacrifice your hamster for doing that.
- If you want to take an entire wiki and make it a part of another one with links, just copy the files and media and you are set! (You have to make sure your content was well namespaced and linked properly using ‘current namespace linking’ styled markup).
- It does not parse the content all the time. It generates the page output and puts them in ‘cache’ folder resulting in good performance.
- It can be used for collaborative writing with control over who can do what using access control lists (ACLs).
- It is multi-lingual.
- Linking to other wikis is easy. I love this feature. I do not have to type in the full URL of Wikipedia for linking to a particular article in there.
- You can enable the setting where anything you write in CamelCase becomes a link. It is then easy to create a page using the missing link showing up a red face. Liked this too. CamelCase linking was also available in Trac.
- Namespacing is simple – all namespaces are folders on the disk. Even if you were to lose the installation, you could still read the source text files and figure out where to go.
- The redirect plugin makes it very easy to handle plural words and to migrate old content to new URLs without breaking links!
- Each page can have its own Table of Contents and that is neat because you can write long entries while Doku takes care of the navigation issue.
If you have a need to build a wiki which is not going to take more than a few dozen hits per second, I would highly recommend you to go for Dokuwiki. It is the best I have seen for small-to-mid level projects.
PS: PHP’s own RFC section uses Dokuwiki.