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

From Linuxintro
imported>ThorstenStaerk
(Created page with "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. Par...")
 
imported>ThorstenStaerk
Line 2: Line 2:
  
 
* backup LocalSettings.php
 
* backup LocalSettings.php
* use https://gist.github.com/esperlu/943776/ to get a file ''mywiki.sqlite''
+
* use https://gist.github.com/esperlu/943776/ to get a file ''wikidb.sqlite''
 +
# ./mysql2sqlite.sh -u wikiuser -pyourpassword wikidb | sqlite3 wikidb.sqlite
 
* change LocalSettings.php to reflect
 
* change LocalSettings.php to reflect
 
  $wgDBtype = "sqlite";
 
  $wgDBtype = "sqlite";

Revision as of 06:25, 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