SQLite on MediaWiki
This extension is based on a WIP in the WMF’s gerrit.
How to use it
Put the following in your composer.local.json
:
{
"require": {
"mediawiki/sqlite-db": "dev-master"
}
}
and then download composer and run composer update
.
You must set the environment variable MW_INSTALL_PATH
to your mediawiki root to use this extension.
$ cd YOUR_MEDIAWIKI_INSTALLATION
$ MW_INSTALL_PATH=`pwd`
$ export MW_INSTALL_PATH
Why this is necessary for installation
In order to install on a SQLite DB this extension tells composer how to autoload it. This is necessary so that when you specify “sqlite” as the db type during installation, it can find the right db driver. It also allows MediaWiki to use $wgDBtype to find the provided DatabaseSqlitedb
class.
Because of this bootstrapping, composer’s autoloader needs to be able to use MediaWiki’s autoloader and we make it available by loading $MW_INSTALL_PATH/includes/installer/Installer.php and using Installer::addDBType() to tell MediaWiki’s installer about this extension.