Self-hosted DokuWiki Software Import

Marc M

I have made a lot of progress in setting up a system to import pages directly into the Dokuwiki software installed on a test server.  Outside of the obvious formatting search and replaces it actually is fairly easy, though the search and replaces can be complex.  The sidebar even begins to work with a little formatting tweaking.

I'm very much in the infancy of this so I don't have a good demo right now, and I am very pressed for time but after a half hour of work I have the beginning of a migration that is workable.  I still like my Wordpress migration the best but this may be a good alternative and less server-hungry for very large Wikis.

Marc M

Over the last few weeks I have learned a lot about Dokuwiki. 
Previously (as some of your know) I set up a migration to a Wordpress installation - which I was quite proud of.  The process wasn't too bad and the result looked and worked great. 

Unfortunately the editing process seemed complicated to people, even though it's pretty basic WYSIWYG editing.  Plus with nearly 900 pages it put a bit of a load on the shared and leased server.  

So I once again went through the various pieces of Open Source and free wiki software and kept coming back to Dokuwiki.  
The formatting is a bit simple but straightforward for other's to use, and since it doesn't use a MYSQL database or any database for that matter, it runs pretty smoothly on anything, even with lots of pages.  Unfortunately it was a bit more work to migrate into it and I had to use more search and replace en masse in a multi-file text editor and lots of complicated search expressions.  Finding ones that worked took the most time, once they did the editor replaced everyone in all 800+ files in less time than it took to take a sip of coffee.  I had to do some of the same replacements as for migration to Wordpress and then lots more.

The nice thing about Dokuwiki is that the wiki pages are stored in .txt files that you can easily FTP in and out of it.  Find that you need a tweak on a couple hundred pages?  No problem, make the changes to the local copies with the search and replace on an editor across all of the files that need editing, and then re-upload.

I tried to keep some notes on the process but unfortunately I didn't keep very good ones this time around.  If others are interested I can post my notes here and some other observations on conversion. 

I have much more to fix, like formatting and such but got the basics done.  I am running it on a few different servers for testing - my own, a friend's, and a couple free hosting sites even.  Here's one on a free site as a test -

So as not scare away some of our contributors I have made it look as close to Wikispaces as possible.

Tom H

Looking good. 

Two things bother me about migrating to DokuWiki:
  1. Wikispaces does not export a Page Name as a Heading, only as a file name. DokuWiki lower cases and substitutes underscores for the space character and other non-alphanumeric characters in the file name. The end result is that the DW Page Table of Contents tab contains the less readable, lowercase, underscore filled filename in fine print with no page heading (unless the original WS page had one added manually). And the sitemap lists these less readable filenames.
  2. WS Page Discussions cannot migrate well to DW because DW has to flatten a multitopic WS Discussion into one headingless series, assuming you can find a way to import them in the first place.
However, DW is not alone in presenting these problems. The first is partly the fault of the WS Export. I've asked that it include a top level heading of the Page Name. The second is also pretty common but I think MediaWiki supports multi-topic threaded discussions but with the expense of added complexity due to the need for a MySQL database.

Marc M

Hey Tom, this got me thinking about a few things.

I found the Admin option called "Use first heading for pagenames", which seems to totally solve this. 

In the pages where I had an actual heading tag all of the display of those page titles were nice names with capitals and punctuation.  Problem solved - except it only worked for a few minutes and now I am getting an error called "Security Token did not match. Possible CSRF attack." and it reset this option back to default (off), so I have to sit down and figure out what's going on with that.  It worked great when it was working though :(

I don't think we're going to find a lot that is going to be perfect for transferring the discussions.  But there is a nice discussion plugin that I set up and tried on one of my other installations that can be automatically added to the end of each page - I was figuring that I would copy and paste any relevant discussions to a box above this discussion area and then people could continue on with whatever they needed to talk about.  Not the best solution but, well...

Marc M

Ah, okay, weird coincidence - tis free hosting company (GoogieHost) gave me a free SSL certificate and that's why the error came up. 

So anyway, Tom and all - if you take a look at some of the main pages you can see that the page titles look nic and are taken from the headings in each page.  Of course, now I have 800+ pages to fix, and I'm not sure that I can build a search and replace that will do it for me.  Possibly.

So I changed the link above and here it is again -