Dear WordPress experts,
I updated a news website to Wordpress 4.7 from 4.6.1 or 4.6. The update ran well, the routine message showed up saying that the database as well should be updated. I clicked "OK". In a short while a 504 Gateway Timeout error occured. Afterwards, in the WordPress dashboard none of the 70.000+ posts has a category, all of the posts are marked as "Uncategorized". Once I try to edit and choose one of the 300+ categories and publish - nothing changes, the post remains "Uncategorized".
In PHPMyAdmin all the tables are fine, wp_terms is fine, all the categories with their IDs are listed there. However, the front-end and the WP-dashboard show no category to be assigned to a post.