Wikibase

Wikibase is a data repository for Mediawiki.

There are two main methods of installation

Mediawiki extension

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.

Extract

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
Composer

From the mediawiki directory run composer. Composer ought to have been installed earlier.

rm composer.lock
composer install --no-dev
Settings

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";
Maintenance

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

Wikibase docker deployment

Github

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.

Fetch
git clone https://github.com/wmde/wikibase-release-pipeline
Copy config
cd wikibase-release-pipeline/deploy
cp template.env .env
Edit config
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
Run

Foreground

docker compose up

Background

docker compose up --detach

Resources

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies