From https://wikitech.wikimedia.org/wiki/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
- Delete privacy sensitive data (cu_changes table, rc_ip field of recentchanges)
- Cleanup wiki replica data T181925: Remove als.wik(ibooks|iquote|tionary), mo.wik(ipedia|tionary) views from replicas
- 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.