Search code examples
mediawikiwiki

How can one permanently remove parts of history edits on MediaWiki?


I got a file uploaded to the wiki that is usually edited by a certain team. As an IT support person I got in to try a few things out with the file, when the team had trouble. As result, I have made an edit, and the team later rolled the edit back.

Problem: on File:filename.pdf under File History it now says things like

  • current [date] [size] [team] reverted
  • revert [date] [size] [me] test edit
  • revert [date] [size] [team] comment

Question

The team wants to erase my edit and their revert from history altogether as if it had never happened.

How can I do that?

I have access to raw database if needed, but hoping there is a simple way.


Solution

    1. If you can live with erasing the whole revision history of the page, you can use the maintenance script DeleteOldRevisions.php:

      php maintenance/deleteOldRevisions.php --delete PAGEID

     

    1. Another option is to enable the RevisionDelete function. This will enable you, as a sysop, to hide specific (non-current) revisions from ordinary users: enter image description here

    Edit: Tgr points out below that it is still possible to see that revisions hidden this way has been hidden.