Jump to content


From mediawiki.org
This page is a translated version of the page Wikibase/Suite and the translation is 37% complete.
Outdated translations are marked like this.
This document covers installing Wikibase Suite manually. For instructions installing Wikibase Suite under Docker, see Wikibase/Docker . For installing just the Wikibase extension, see Wikibase/Installation .


Eine Wikibase-Installation besteht häufig aus den folgenden Elementen:

  • An RDBMS (MariaDB/MySQL or SQLite) [notwendig]
  • MediaWiki [notwendig]
    • Die Wikibase-Erweiterung [notwendig]
    • Andere ähnliche Erweiterungen [optional]
  • Der Wikidata-Abfragedienst (WDQS) [optional]
    • The WDQS proxy
    • The WDQS frontend
  • QuickStatements [optional]
  • Elasticsearch [optional]

The Docker install contains all these components and can be started with a single docker-compose command. This install meets the needs of many Wikibase users, especially those just starting out.

However, for those not wanting to run Docker (because of additional administrative overhead, scaling issues in production, or a desire to understand the components better), here's how to install each component manually.


Consult the network description and diagram:


Before you dive in

There's a large amount of technical documentation to be read and enjoyed at the Wikibase technical doc site.

To successfully navigate this process, you should probably have:

  • Familiarity with Linux and web server software
  • One or more servers on which you have permissions to install software

Die Wikibase-Suite installieren




The MediaWiki install linked in the next step relies on a running RDBMS with a database and user already created.

We recommend using MariaDB, and though a full installation guide is outside of the scope of this document, start with this excellent collection of documentation and this tutorial.



  • Note that while the vanilla install of MediaWiki (correctly) notes PostgreSQL as a working option, Wikibase does not work with PostgreSQL.
  • For this install of MediaWiki, we recommend using nginx with php-fpm.
  • This configuration assumes you have php-fpm running on the same host; to use a network port use fastcgi_pass HOST:9000.
  • You will need the following PHP extensions (install doc): calendar ctype dom fileinfo iconv intl json mysql mbstring xml


Install instructions for MediaWiki

Working MediaWiki nginx config



Install zip and unzip for Composer to work correctly.

The Wikibase data model is described in these documents:


Installation guide for Wikibase

Installation guide for Composer

Optional sidebar

If you'd like to add some Wikibase-related links to your main page sidebar, you can add these configuration stanzas to your LocalSettings.php.


There are many extensions often used with Wikibase. Only some require special install instructions for a Wikibase context; the list below includes information about all extensions included in our Docker images.


Wikibase needs the OAuth extension for the Wikidata query service, as you'll see below.


The OAuth install instructions are comprehensive. Note that you'll benefit from a working understanding of Benutzerrechte to finish this install.

Andere Erweiterungen

These extensions can be installed simply using their own installation instructions.

Native and non-native data types

Extending Wikibase's functionality beyond its native data types may require the installation of additional extensions.

Native data types
  • commonsMedia = "string"
  • entity-schema = "string"
  • external-id = "string"
  • geo-shape = "string"
  • globe-coordinate = "globecoordinate"
  • monolingualtext = "monolingualtext"
  • quantity = "quantity"
  • string = "string"
  • tabular-data = "string"
  • time = "time"
  • url = "string"
  • wikibase-item = "wikibase-entityid"
  • wikibase-property = "wikibase-entityid"
Non-native data types

Many other data types exist and are implemented in some instances of Wikibase, such as Wikidata. Because these other instances are frequently highly customized, below is a list of officially supported data types and the extensions they require:


Der Wikidata-Abfragedienst (WDQS), das aus dem Blazegraph SPARQL-Abfrage-Backend und seinem Updater besteht, kann und wird oft in Verbindung mit Wikibase verwendet.


While intrepid users may wish to compile their own instance of WDQS, we recommend using the precompiled version.



Elasticsearch is a Lucene-based search engine. To get it working with MediaWiki/Wikibase, you'll need the following software:


wfLoadExtension( 'Elastica' );
wfLoadExtension( 'CirrusSearch' );
wfLoadExtension( 'WikibaseCirrusSearch' );

$wgCirrusSearchServers = [ '<name/IP of host running ElasticSearch>' ];
$wgSearchType = 'CirrusSearch';
$wgCirrusSearchExtraIndexSettings['index.mapping.total_fields.limit'] = 5000;
$wgWBCSUseCirrus = true;
> $PATH_TO_ELASTICSEARCH/bin/elasticsearch-plugin install org.wikimedia.search:extra:6.5.4
> $PATH_TO_ELASTICSEARCH/bin/elasticsearch-plugin install org.wikimedia.search.highlighter:experimental-highlighter-elasticsearch-plugin:6.5.4
  • Ändere elasticsearch.yml nach Bedarf:
    • Name your cluster with the cluster.name directive.
    • Make a single-node cluster: discovery.zen.minimum_master_nodes: 1
    • Set network.host as needed
  • Modify jvm.options as needed (above all, set -Xms and -Xmx based on the amount of memory available to your host)
  • Note the "flood stage" settings for your disk size.
    • You can either ensure that at least 5% of the disk is available at all times, or you can alter the cluster.routing.allocation.disk.watermark.flood_stage setting. For more information, consult this StackOverflow article.
  • Run UpdateSearchIndexConfig for CirrusSearch:
php extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php --startOver
  • Start jobs running in the background:
php /var/www/html/maintenance/runJobs.php --wiki my_wiki --wait &
  • Run ForceSearchIndex:
php extensions/CirrusSearch/maintenance/ForceSearchIndex.php --queue --maxJobs 10000 --pauseForJobs 1000 --skipLinks --indexOnSkip



  • Klone mit Git die zwei Repositorien in dein Web-Stammverzeichnis (im Folgenden www_root):
  • Führe in www_root/quickstatements composer install aus.
  • For the files that follow, determine the appropriate values in your installation for the following environment variables, and set them. They can also be easily substituted in place using envsubst.
MW_SITE_NAME="site name"
  • Create the following files with the contents specified.


	"site" : "${MW_SITE_NAME}" ,
	"bot_config_file" : "/var/www/html/bot.ini" ,
	"logfile" : "/var/log/quickstatements/tool.log" ,
	"sites" : {
		"${MW_SITE_NAME}" : {
			"oauth" : {
				"language":"${MW_SITE_LANG}" ,
				"project":"${MW_SITE_NAME}" ,
				"ini_file":"/quickstatements/data/oauth.ini" ,
				"publicMwOAuthUrl":"${WB_PUBLIC_SCHEME_HOST_AND_PORT}/w/index.php?title=Special:OAuth" ,
				"mwOAuthUrl":"${WB_PUBLIC_SCHEME_HOST_AND_PORT}/w/index.php?title=Special:OAuth" ,
			} ,
			"server" : "${WB_PUBLIC_HOST_AND_PORT}" ,
			"api" : "${WIKIBASE_SCHEME_AND_HOST}/w/api.php" ,
			"pageBase" : "${WB_PUBLIC_SCHEME_HOST_AND_PORT}/wiki/" ,
			"toolBase" : "${QS_PUBLIC_SCHEME_HOST_AND_PORT}/" ,
			"types" : {
				"P" : { "type":"property" , "ns":"${WB_PROPERTY_NAMESPACE}" , "ns_prefix":"${WB_PROPERTY_PREFIX}" } ,
				"Q" : { "type":"item" , "ns":"${WB_ITEM_NAMESPACE}" , "ns_prefix":"${WB_ITEM_PREFIX}" }


; HTTP User-Agent header
agent = 'Wikibase QuickStatements'
; assigned by Special:OAuthConsumerRegistration (request modelled after https://www.wikidata.org/wiki/Special:OAuthListConsumers/view/77b4ae5506dd7dbb0bb07f80e3ae3ca9)
consumerKey = '<OAUTH_CONSUMER_KEY>'
consumerSecret = '<OAUTH_CONSUMER_SECRET>'
  • Set these environment variables according to your installation:
    • MW_ADMIN_NAME: MediaWiki username with administrator rights
    • QS_PUBLIC_SCHEME_HOST_AND_PORT: External IP of your query service instance
  • With the variables set, create an OAuth consumer by executing the following php script on your MediaWiki installation where OAuth is installed:
php /var/www/html/extensions/OAuth/maintenance/createOAuthConsumer.php \
    --approve \
    --callbackUrl $QS_PUBLIC_SCHEME_HOST_AND_PORT/api.php \
    --callbackIsPrefix true \
    --user $MW_ADMIN_NAME \
    --name QuickStatements \
    --description QuickStatements \
    --version 1.0.1 \
    --grants createeditmovepage \
    --grants editpage \
    --grants highvolume \
  • A successful response will have the "created" flag set to "true", as in this example:

For more information, consult the Docker image README.