Wikibase is a data repository for Mediawiki.
There are two main methods of installation
Visit the download page and fetch the correct version.
This guide details the steps required to install the extension which is also outlined below with Mediawiki 1.43.
Enter the mediawiki installation directory and extract the archive into the extensions directory
cd /var/www/htdocs/www.examle.com/w tar zxvf ~/Wikibase-REL1_43-XXXXXXX.tar.gz -C extensions chown -R www-data:www-data extensions/Wikibase
From the mediawiki directory run composer. Composer ought to have been installed earlier.
rm composer.lock composer install --no-dev
Update the LocalSettings.php file to enable the extension.
wfLoadExtension('WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json"); require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
Run the initial maintenance scripts to build the database tables to prepare the site.
php maintenance/run.php update php maintenance/run.php ./extensions/Wikibase/lib/maintenance/populateSitesTable.php php maintenance/run.php ./extensions/Wikibase/repo/maintenance/rebuildItemsPerSite.php php maintenance/run.php populateInterwiki
This setup requires a modern version of docker to be installed and was tested on Debian bookworm on a dual core VM with 12GB of RAM.
git clone https://github.com/wmde/wikibase-release-pipeline
cd wikibase-release-pipeline/deploy cp template.env .env
vi .env
# Public hostname configuration. WIKIBASE_PUBLIC_HOST=wikibase.example.com WDQS_FRONTEND_PUBLIC_HOST=wdqs-frontend.example.com QUICKSTATEMENTS_PUBLIC_HOST=quickstatements.example.com # MediaWiki / Wikibase user configuration. MW_ADMIN_NAME=username MW_ADMIN_EMAIL=email@example.com MW_ADMIN_PASS=changemetoatleast10chars # MediaWiki / Wikibase database configuration. DB_NAME=dbname DB_USER=dbuser DB_PASS=changemetoatleast10chars
Foreground
docker compose up
Background
docker compose up --detach