Delete a wiki

From Wikitech
Jump to navigation Jump to search

Usually, wikis are closed, not deleted.[1] Closing a wiki means that it is not editable anymore, but the content is still available.

When we delete a wiki, the steps outlined below need to be performed, which makes MediaWiki claim that the wiki does not exist. Actually deleting the data from all of the database servers would be quite a bit more complicated, and is usually not worth doing.

To delete a wiki

  • Remove the wiki from wikimedia's wiki configuration:
    • Remove the wiki from all.dblist and any other dblists it exists in
    • Add the wiki to deleted.dblist
    • Remove all other references from CommonSettings and InitialiseSettings etc.
    • Remove the logo from w/static/images/project-logos
    • Do not remove the wiki from wmf-config/interwiki.php manually (done automatically later)
  • Delete privacy sensitive data (cu_changes table, rc_ip field of recentchanges)
  • Cleanup wiki replica data (or create a subtask to have WMCS do it for you):
    • Run sudo maintain-views --debug --drop --databases <database> on all replica servers to delete the _p view as well as all other views. The database itself is not dropped.
    • Run maintain-meta_p --all-databases --purgeon all replica database servers. If you do this before the mediawiki/config patch mentioned above is applied, the result is T184433.
    • Cleanup dns entries in puppet for the replica at modules/profile/files/openstack/base/pdns/recursor/labsdb.zone. Run puppet on labservices1001|2 to apply the change.
  • Clean up the centralauth database. If you don't do this, the result is T30393. For small wikis it should be possible to do this manually:
    • Run sql centralauth
    • SELECT COUNT(*) FROM localnames WHERE ln_wiki='wikidb';
    • If this is less than say 20,000:
      • DELETE FROM localuser WHERE lu_wiki='wikidb';
      • DELETE FROM localnames WHERE ln_wiki='wikidb';
  • Likewise, the globalimagelinks table can be cleaned up:
    • Run sql commonswiki
    • DELETE FROM globalimagelinks WHERE gil_wiki='wikidb';
  • Any jobs in the job queue should be deleted via wmfManageJobs.php in WikimediaMaintenance/. This avoids T171371.
  • Update the interwiki cache

See also

Notes

  1. <bawolff> Shirley: creating a wiki is like creating a baby, yes you should have a good reason to create one, but if you don't for whatever reason, you should have an _extra_ good reason for killing one