I would like to setup a Mediawiki site. In order to manage the site, I deliver code changes to a Git folder, and the changes are then transmitted to a staging server for test and to production for use.
If I want to make changes to configurations that are in the file system there is no problem since the FS will be on Git. But what if I want to have control even on aspects that are saved in the database, like the categories and the templates that are available on my site? An obvious way would be to dump and restore the database, but I don't want to store all of it in Git. Is there a way to automate this process (having a configuration file in Git that does the work for you?)
Perhaps using MediaWiki's page import/export functionality will work for you?
https://www.mediawiki.org/wiki/Help:Import https://www.mediawiki.org/wiki/Help:Export
It's cleaner than storing the whole database in Git, and the XML import/export files are mostly human-readable. They can only contain pages, so this will take care of categories and the templates, but it won't handle e.g. defining an administrator account. Also, note that there's no easy way to "undo" an import (you'd have to delete or revert the imported pages by hand).
mediawiki-l@lists.wikimedia.org