How to Assign / Move all Deleted post to a category

Option 1: backup – Many hosts offer backups. Sometimes you have to pay for them, but often even when you do, they’ve actually been backing everything up and paying just allows you to access them. Worth checking as this will be fastest.

Option 2: post listing screen – If these posts all had only 1 category, the one that was deleted, they’ll be uncategorized now. You can go to the All Posts screen in wp-admin to find all the uncategorized posts, use Screen Options up at the top to show however many you want at a time – I’d suggest 100 at a time – and page by page, check all and bulk edit to assign the new category.

Option 3: if all else fails – If you have no backup and the posts have other categories, but you have a list of the particular posts you want to put back in the category, you can run queries in phpMyAdmin to associate these posts to that category. You’ll want to first find the post ID of every post you’re trying to add into the category, and then you can find the query that will associate those post IDs to the category.