WordPress: Bulk Category Move

Quick Bits - WordPress category tileAs part of my website redesign I needed to change around my categories. With over 600 posts this could be quit daunting, although I was keeping the categories with a lot of the posts. I did a quick Google search for WordPress bulk move category to look for tips and all I found in the top results were references to plugins. Nothing against plugins (I use many) but this isn’t something I wanted to test enough to trust on this site. I’d hate to miss a bug that corrupts my site.

Then I did what I should have done first. I listed the posts in a category and looked at the bulk edit options. And my solution was there. I had three things going for me:

  1. I’ve been excluding category pages from search engine indexes for a very long time. No need to worry about someone clicking a search result to find a “page not found” error.
  2. I was completely eliminating the categories.
  3. With only a very few exceptions, I was moving every post into an old category into an existing category then I was adding a tag with the old category name.

The process was simple (for the record I’m on WordPress 2.9.x).

  1. Go to categories in the WordPress administration panel and click on the number next to the category to list all the posts in the category.
  2. Select all the categories listed then select “Edit” under bulk options and click “Apply”. This will open a bulk edit box at the top of the screen.
  3. I selected the category I wanted everything in and I typed in the new tag (to match to old category name)
  4. I clicked “Update Posts”. This added the category to the existing selection(s) and added the tag to the existing tags. Nothing was removed.
  5. If there were a lot of posts I completed steps 1 through 4 multiple times to get through them all, one page of 25 at a time.
  6. I went back to categories and deleted the old category (Ok, first I listed the posts again and made sure everything was right.) Since the posts were already in another category the old category was simply removed.

2 thoughts on “WordPress: Bulk Category Move”

  1. Nice tip.

    By the way, you can display more than 25 posts at a time in the edit panel by simply adding a record on wp_postmeta with your uid, meta_key="edit_post_per_page" and meta_value=whateveryouneed.


Comments are closed.

%d bloggers like this: