Migrating mediawiki from mysql to sqlite

From Linuxintro
Revision as of 06:25, 29 August 2013 by imported>ThorstenStaerk

I tried to migrate my mediawiki installation from mysql to sqlite. To do this I wanted to just convert the database below it, change LocalSettings.php and be good with it. Parts went surprisingly well, but other parts not. This is not a ready tutorial, but here to give you some ideas.

# ./mysql2sqlite.sh -u wikiuser -pyourpassword wikidb | sqlite3 wikidb.sqlite
  • change LocalSettings.php to reflect
$wgDBtype = "sqlite";
$wgDBserver = "";
$wgDBname = "mywiki";
$wgDBuser = "";
$wgDBpassword = "";
$wgSQLiteDataDir = "/srv/www/htdocs";

Then name your .sqlite file /srv/www/htdocs/mywiki.sqlite.

  • chown your .sqlite file
  • run maintenance/update.php