User:Tobias Gritschacher (WMDE)/Wikibase/Installation

=Prerequisites=

MediaWiki
Technically, Wikibase is an extension (actually two extensions) to MediaWiki, so you need to set up MediaWiki first.

Composer
The easiest way to install all all dependencies of Wikibase is using Composer. Here you can find installation instructions for Composer.

=Installation=

Meet the prerequisites
Make sure you've set up MediaWiki and installed Composer.

Get Wikibase
Download Wikibase into the extensions folder of your MediaWiki installation. There are several ways to download Wikibase.

Download from Git

 * For getting the latest version of Wikibase, do:
 * For getting a specific version of Wikibase you have to specify the branch you want to download:

Download archive

 * Instead of using Git you can alternatively download an archive with the latest version of Wikibase or choose to download a specific version of Wikibase.
 * Make sure you extract the archive into a new folder inside the extensions folder of your MediaWiki installation.

Fetch all dependencies
or depending on how Composer was installed on your machine.
 * cd into Wikibase inside the extensions folder of your MediaWiki installation:
 * If you've set up Composer correctly, you should be able to fetch all dependencies by running

Adjust your LocalSettings.php
Add the following lines to LocalSettings.php of your MediaWiki installation. You have three options, depending on whether you want to enable Wikibase Repository, Wikibase Client or both of them.

Run the setup scripts
Finally, you have to run some maintenance scripts.

For Wikibase Repository and Wikibase Client

 * Run the database update script of your MediaWiki installation:


 * Run the script that populates the sites table:

For Wikibase Client only

 * If you want to run a Wikibase Client, you'll also need to run the script that populates the interwiki table: