Delete a wiki
From Wikitech
(Difference between revisions)
(wikiname is misleading, use wikidb instead) |
|||
| Line 15: | Line 15: | ||
* Open php/wmf-config/db.php and determine which database server is the master for the centralauth database. | * Open php/wmf-config/db.php and determine which database server is the master for the centralauth database. | ||
* Run mysql -h <host> centralauth | * Run mysql -h <host> centralauth | ||
| − | * SELECT COUNT(*) FROM localnames WHERE ln_wiki=' | + | * SELECT COUNT(*) FROM localnames WHERE ln_wiki='wikidb'; |
* If this is less than say 20,000: | * If this is less than say 20,000: | ||
| − | ** DELETE FROM localuser WHERE lu_wiki=' | + | ** DELETE FROM localuser WHERE lu_wiki='wikidb'; |
| − | ** DELETE FROM localnames WHERE ln_wiki=' | + | ** DELETE FROM localnames WHERE ln_wiki='wikidb'; |
If you don't do this, the result is [https://bugzilla.wikimedia.org/show_bug.cgi?id=28393 bug 28393]. | If you don't do this, the result is [https://bugzilla.wikimedia.org/show_bug.cgi?id=28393 bug 28393]. | ||
[[Category:How-To]] | [[Category:How-To]] | ||
Latest revision as of 09:09, 16 November 2012
Usually, wikis are closed, not deleted. Closing a wiki means that it is not editable anymore, but the content is still available.
When we delete a wiki, we usually only delete it from all.dblist, 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:
- cd /home/wikipedia/common
- Remove the wiki from all.dblist
- Add the wiki to deleted.dblist
- Run ./refresh-dblist
- Run sync-dblist
For small wikis it should be possible to clean up the centralauth database manually:
- Open php/wmf-config/db.php and determine which database server is the master for the centralauth database.
- Run mysql -h <host> 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';
If you don't do this, the result is bug 28393.