How to Edit WordPress Categories Without Losing Posts
In this article
This guide shows you how to add, edit, and delete categories in WordPress while keeping all your posts safe and intact. You'll learn the exact steps for each action, plus what to avoid so your content never disappears or gets reassigned to the wrong category.
What You'll Need
- A WordPress site with admin access (you need to be able to log in to the dashboard).
- If you're using a caching plugin, have it ready to clear after changes.
Step-by-Step
Adding a New Category
- Log in to your WordPress admin dashboard (usually
yoursite.com/wp-admin). - Go to Posts → Categories in the left sidebar.
- In the "Add New Category" box, enter a Name (this is what visitors see).
- Optional: Enter a Slug (the URL-friendly version). If left blank, WordPress creates one automatically from the name.
- Optional: Choose a Parent Category if you want this to be a subcategory.
- Optional: Add a short Description (some themes display it).
- Click the Add New Category button. The category appears in the list on the right.
Editing an Existing Category
- Go to Posts → Categories.
- Hover over the category name in the list and click Edit (or click the name itself).
- Change the name, slug, parent, or description as needed.
- Click Update. All posts already assigned to this category will automatically use the new name and slug — no posts are lost.
Deleting a Category (Without Losing Posts)
- Go to Posts → Categories.
- Hover over the category you want to delete and click Delete.
- WordPress will ask what to do with the posts currently in that category. Choose one of two options:
- Delete all posts — this removes the posts entirely (not recommended unless you truly want to delete them).
- Assign to another category — select an existing category from the dropdown. This moves the posts to that category, so nothing is lost.
- Click OK to confirm. The category is gone, and the posts are now in the chosen category.
Bulk Deleting Categories
- Go to Posts → Categories.
- Check the boxes next to the categories you want to delete.
- Select Delete from the "Bulk actions" dropdown and click Apply.
- WordPress will show the same prompt for reassigning posts. Choose the destination category and confirm.
Common Mistakes
- Choosing "Delete all posts" accidentally — this permanently removes your content. Always choose the "assign to another category" option unless you're absolutely sure.
- Deleting a parent category — WordPress will ask what to do with its child categories too. If you delete the parent, the children become top-level categories, which may change your site's structure.
- Editing a slug without updating internal links — if you have hardcoded links to the old category URL, they will break. Use a redirect or update the links.
- Using the same name for two categories — WordPress allows duplicate names, which confuses visitors and can cause misassignment.
Tips
- Before making major changes, back up your database. Many hosting panels offer one-click backups.
- Use a staging site to test category changes if you have a live site with lots of traffic.
- When renaming a category, consider using a redirect plugin to keep old links working.
- Keep your category structure simple — too many categories can confuse readers and dilute your SEO.
- After deleting or merging categories, clear any caching plugins to ensure visitors see the updated structure.
Troubleshooting
- Posts disappeared after deletion — If you chose "Delete all posts," they are in the trash. Go to Posts → All Posts, click the Trash tab, and restore them. If the trash was already emptied, you'll need a backup.
- Category not showing on the site — Clear your cache (browser and any caching plugin). Also check that the theme's menu includes that category (if it's a custom menu, you may need to add it).
- Posts still show the old category name — This is usually a caching issue. Clear all caches and check again.
- Can't find the Categories screen — Make sure you're logged in as an admin. If you're an editor, you may not have permission to manage categories.
- Slug change causes 404 errors — Use a redirect plugin to map the old URL to the new one, or update any internal links.
Frequently Asked Questions
Will deleting a category delete my posts?
Only if you choose the "Delete all posts" option. If you select "Assign to another category," your posts are moved to that category and remain published.
Can I merge two categories into one?
Yes. Edit one category to the name you want, then delete the other and assign its posts to the first category. Alternatively, use a plugin like "Category Merging" for a one-click merge.
Does renaming a category change the URL?
Only if you also change the slug. The slug is the part after yourdomain.com/category/. If you change the name but keep the slug, the URL stays the same.
Can I recover a deleted category?
If you deleted the category but did not delete the posts, the posts still exist. You can create a new category with the same name and reassign the posts. If you deleted the posts, restore from trash or a backup.
Why can't I delete a category?
WordPress always requires at least one category. If you have only one, you must first create a new category, then delete the old one (and assign posts to the new one).
Do categories affect SEO?
Yes, category pages can rank in search engines. Changing a category name or slug can temporarily affect rankings, but using redirects minimizes the impact.