MediaWiki Administrator's Handbook/Page Deletion

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Sometimes it is necessary to hide a page rather than just fix it or redirect it elsewhere. Although this function is described as "deletion" it doesn't physically remove it from the underlying database. Instead the page is marked as delete and is hidden from view for normal users (that is, those without administrator privileges).

Once you have become an administrator one of the first things you will notice is a brand-new "delete" tab at the top of most pages in addition to the normal ones. This will take you to a deletion prompt.

Once there, fill in the explanation and click "Delete page". Some versions of MediaWiki have a "Yes, I really want to delete this" checkbox, so tick that before clicking delete otherwise it will not work.

What should be deleted depends on the project's inclusion rules, but generally:

Deleting specific revisions[edit | edit source]

If you wish to delete only some revisions of a page - for example someone's private contact details or a copyright violation -this can be done using the "revision deletion" functionality from the page history display. Select the revision you wish to delete then click the show / hide selected revisions button. You will be given the option of hiding the content of the revision, the account name that made the revision or the edit summary. One or more options can be selected. Enter a reason for hiding the revision then click apply to selected revision to complete the action.

Hidden revisions remain visible to other administrators. In some cases the revision may need to be hidden from administrators as well. This is achieved using the suppression function (called oversight in earlier versions of MediaWiki). On all Wikimedia projects the suppression function is only available to Oversighters and Stewards.

Restoring some or all deleted revisions[edit | edit source]

Once a page has been deleted it is invisible to normal users, but admins visiting that same "no such article" page will also see a line at the top saying "View or restore ## deleted edits?". This line also appears on the revision history page if the page still exists but has had some past revisions deleted.

Regardless of its location, clicking on the link will display the revision history. MediaWiki builds from before February 16, 2006 will show the last revision before deletion above the revision history. Each of these can be viewed on its own by choosing the appropriate date and time entry. MediaWiki builds from after February 16, 2006 will display the raw wiki source for the page (with a button below which can render it as it appeared), while those before this date will show the rendered page. Regardless of what version you are using the diff view function is currently not supported for deleted pages.

If you want to restore all deleted revisions merely click "Restore!", but if you want to exclude specific revisions you will need to check the boxes of every revision other than those ones before clicking Restore, at the moment there is no "restore all but selected" option. For pages that have had a lot of edits this can be a laborious process.

Revision restoration does not have to happen all at once however, and even multiple admins can simultaneously restore edits of the same page (although they will encounter some errors if they both select a matching revision).

Merging page histories[edit | edit source]

Sometimes when merging pages it is desirable to merge their edit histories together rather than simply using redirects. In this case you will need to delete the page in question, move one of the source pages over top of it, delete the page again, move the next over top, etc. etc. etc. Once completed simply restore all the revisions by clicking the history tab and going through the procedure described above.

Depending on the version of MediaWiki running the newest revision may become the current revision, so you may need to revert to an earlier revision where all the source pages had already been merged.

A step-by-step explanation is found in Edit History.

Mass page deletion[edit | edit source]

The mass deletion function (also known as nuke) can be used to remove a large number of pages quickly and easily. It is useful when combating page creation vandalism. The mass deletion function is accessed from Special:Nuke. Three options to filter the pages to be deleted are available:

  • All users or by username or IP address
  • All pages or by page name (using a pattern)
  • Maximum number of pages

Selecting go will bring up a list of pages based on your selection criteria. By default all pages are "checked" and will be deleted. Enter a reason in the description field then select delete selected to complete the mass deletion. Be careful with this function as there is no mass undelete!

Local Policies[edit | edit source]