MediaWiki-Docker/Configuration recipes/Alternative databases

Alternative databases
The default configuration uses SQLite for the database backend, but you can use MySQL (with replication or without) or Postgres instead.

MariaDB (database replication)
This is the configuration recipe that is most like Wikimedia production.

These instruction assume a new installation (no LocalSettings.php).

To install MediaWiki, open a bash shell in the container:

In this bash shell, install MediaWiki with the following command:

After installing, add these snippets so that MediaWiki knows to read from the replica but write to the main database.



MariaDB (single database server)
These instruction assume a new installation (no LocalSettings.php).



To install MediaWiki, open a bash shell in the container:

In this bash shell, install MediaWiki with the following command:

Postgres (single database server)
These instruction assume a new installation (no LocalSettings.php).



To install the MediaWiki database tables, use: