Jump to content

Topic on Project:Support desk

How to delete deletion history?

7
Deletedaccount4567435 (talkcontribs)

Hi guys,

Just get an old wiki with about 85k spam pages without any backup. I delete all spam with DeleteBatch.php. Then the problem become 85k pages deletion history. How can I remove all those deletion record?

Thank you!

Star Warden (talkcontribs)

Are you trying to hide that you deleted those pages? If so, you will need revision rights, which you need to enable in localsettings.php (see Manual:RevisionDelete). If you're trying to delete archived revisions (but not the history of a page), then Manual:DeleteArchivedRevisions.php. If you're trying to delete page histories, then Manual:DeleteOldRevisions.php.

There's also an extension that lets you delete pages permanently, without any trace (Extension:DeletePagesForGood). You could also delete their data by accessing the database itself and searching them in the tables they belong to (though you're better off trying the previous options).

Hope it helps!

Deletedaccount4567435 (talkcontribs)

Is there any way to selective delete(remove from database ,not hide) those deleted version of spam pages from text table and archive table?

It seems I can clean out text table by purgeOldText.php. However, before that I need to selective delete those spam page from archive table. How to do so?

deleteArchivedRevisions.php isn't selective.

Star Warden (talkcontribs)

By selective do you mean containing a specific phrase/word? If so, just use the search function of the database.

87.123.0.246 (talkcontribs)

The deletions are logged inside the database table logging. Deletions have "delete" as value in column log_type. You can then limit the rows to remove e.g. using the value of log_timestamp and of log_user_text.

87.123.0.65 (talkcontribs)
87.123.0.65 (talkcontribs)

If you deleted many spam revisions in one go, then it will be pretty simple to identify and delete them from the database: Inside the archive table, these revisions will have a value for ar_id. This value is an auto_increment and together with the other values of a given row you will be able to see, if you deleted the according revisions together with the other spam or if it got deleted in a different action. You can use ar_id and e.g. ar_user and ar_timestamp to check that!

Reply to "How to delete deletion history?"