Permanently remove a MediaWiki revision using SQL
From WickyWiki
You saved sensitive information for example like a password in your MediWiki? Now it is almost impossible to remove this permanently. Here you can read how to remove the text of a revision using two SQL statements.
With MediaWiki:
- First edit the page to make a new revision with the sensitive information removed.
- Go to page history and re-open the revision, the sensitive information will still be there
- Note the Permanent link, this URL points to this specific revision and looks like http://mediawiki/index.php?&oldid=1248 here the number 1248 points to the revision you want to remove.
- To be sure try the link in your browser
Backup your (MySQL) database before you continue!
In the following example 1248 denotes the revision we are removing:
-- mark the revision as deleted: update revision set rev_deleted=1 WHERE rev_id = 1248 ; -- overwrite the old text: update text set old_text = 'DELETED' where old_id in (SELECT rev_text_id FROM revision WHERE rev_id = 1248) ;