Difference between revisions of "Convert a dokuwiki to mediawiki"

From Linuxintro
imported>ThorstenStaerk
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
To convert a [[dokuwiki]] installation to a [[mediawiki]] installation:
+
This describes how to convert a [[dokuwiki]] installation to a [[mediawiki]] installation. All history, users and access control lists will not be taken over. This howto has been successfully tested with MediaWiki 1.16 and 1.19.1. For MediaWiki versions newer than 1.23.x, it will need an update; in these newer versions, <code>importTextFile.php</code> no longer is there and [https://www.mediawiki.org/wiki/Manual:Edit.php edit.php] has to be used instead.
  
= Mediawiki =
+
* install mediawiki. In this example we assume you install to /srv/www/htdocs.
* install mediawiki
+
* convert the syntax of every dokuwiki page to Mediawiki's syntax. [http://www.staerk.de/thorsten/mediasyntax MediaSyntax] has a converter for this.
* create a page hello with the sole content ''hello world''.
+
* cd to the maintenance folder of your mediawiki, e.g.
* export the hello page
+
cd ''/srv/www/htdocs/maintenance''
* save the export file to export1 and export2
+
* import all text files from dokuwiki, e.g.:
* edit export1, delete all content starting from ''hello world'' including
+
for i in /srv/www/htdocs/dokuwiki/data/pages/*; do php importTextFile.php $i; done
* edit export2, delete all content till ''hello world'' including
+
* now you will want to care about subdirectories, images and files in the dokuwiki as well
* for every dokuwiki page in data/pages, do a
 
cat export1 ''page'' export2 > import.xml
 
  
 
= See also =
 
= See also =
 
* [[How to make dokuwiki a good mediawiki]]
 
* [[How to make dokuwiki a good mediawiki]]
 +
 +
[[Category:Guides]]

Latest revision as of 22:48, 30 October 2015

This describes how to convert a dokuwiki installation to a mediawiki installation. All history, users and access control lists will not be taken over. This howto has been successfully tested with MediaWiki 1.16 and 1.19.1. For MediaWiki versions newer than 1.23.x, it will need an update; in these newer versions, importTextFile.php no longer is there and edit.php has to be used instead.

  • install mediawiki. In this example we assume you install to /srv/www/htdocs.
  • convert the syntax of every dokuwiki page to Mediawiki's syntax. MediaSyntax has a converter for this.
  • cd to the maintenance folder of your mediawiki, e.g.
cd /srv/www/htdocs/maintenance
  • import all text files from dokuwiki, e.g.:
for i in /srv/www/htdocs/dokuwiki/data/pages/*; do php importTextFile.php $i; done
  • now you will want to care about subdirectories, images and files in the dokuwiki as well

See also