Skip to main content

Backup MediaWiki

Database dump

For downloadable dumps of Wikipedia's article database, see Wikipedia:Database download. For a description of the database format and fields, see database layout.

To create your own dump of a local MediaWiki site, you can use the dumpBackup.php script found in the maintenance directory of your MediaWiki installation tree. Make sure that AdminSettings.php has been configured. By default, MediaWiki ships with an AdminSettings.sample file that needs to be edited to suit your configuration and renamed to AdminSettings.php

An example invocation to a full backup might look like:

 php maintenance/dumpBackup.php --full > full.xml

Command line options for dumpBackup.php are explained by running it with no parameters, i.e.

 php maintenance/dumpBackup.php

However, there are some extra undocumented options in its source code.