After a wiki is recreated it will often give a NameTableAccessException or RevisionAccessException, sometimes hours after the recreation. To fix this, you may need to manually run some SQL or PHP commands to insert the data. The following commands may need ran (in order):
You can also use shell.php and run (in order):
Repeat for any others needed such as potentially sanitized-css.
If the order somehow goes wrong from what matches in the content table you can try different orders/ids by running:
After running that make sure you exit shell.php or sql.php (if using) and rerun or it won’t know of the AUTO_INCREMENT being reset and IDs will still be wrong.