How to reset/flush a MediaWiki? [closed]
Solution 1:
Probably the easiest way would be to first create a mysqldump
of the database while it's pristine:
mysqldump -u <username> -p <password|credentials file> mediawiki > media-wiki-pristine.sql
...then script a MySQL database drop:
mysql -u <username> -p <password|credentials file> -e "drop database mediawiki;"
...followed by a mysql import:
mysql -u <username> -p <password|credentials file> < media-wiki-pristine.sql
...to restore the database after your test completes.
Might need to double-check syntax on my suggested commands; been a while and I'm not sure what version you're using of MySQL.