Difference between revisions of "Migrating mediawiki from mysql to sqlite"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 14: Line 14:
 
* chown your .sqlite file
 
* chown your .sqlite file
 
* run maintenance/update.php
 
* run maintenance/update.php
 +
 +
= See also =
 +
* [[Migrating_a_database_from_mysql_to_sqlite]]

Revision as of 06:30, 29 August 2013

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

See also