Cleaning Up Post Tags with WordPress Bulk Edit

I recently went through a major upgrade for Taking Your Camera on the Road, one of the oldest websites in the world, on WordPress since 2003, and the testing grounds for some of the earliest WordPress Plugins and Themes. Have I got a lot of lessons learned to share with you.

To begin with, I want to offer the following simple tip involving the powerful Bulk Editor feature in WordPress. Moving around all the posts and upgrading meant losing all the tags on the posts. Trust me, it’s a long story and I’ll save you from it for the moment. The result was that I was stuck with tons of posts with no tags.

You can quick edit any post from the Posts panel by hovering over the post and choosing the Quick Edit option.

This opens up a view of the meta data of your post, not the entire post for editing. Quick Edit allows you to change the post title, slug, date, author, password, categories, post tags, comment status, ping status, published status, and turn post sticky on or off.

While this is amazing for a single post or two, I was changing hundreds and hundreds of posts.

Using the WordPress Post Bulk Edit

The WordPress Bulk Edit feature is fantastic for changing the meta data for a lot of posts all at the same time. No need to go one by one through each to change it. While it is fast and easy to use, it also has its limits. Let’s start with how to use it.

To begin the process, narrow down the posts by category, grouping like content together.

On the drop down options bar of the Posts Panel, choose Categories and select the category you wish to work on from the drop down menu, then click Filter. This will sort your posts by that category, narrowing down the number of posts to fix.

On the left side of every post in the list is a checkbox. To select them all, click the checkbox next to Title on the top row of the table of posts. If you would like to narrow down the checked posts, either check them manually, or check them all and then uncheck the ones you do not wish to change using the bulk edit feature.

From the options bar, choose Edit from the Bulk Actions drop down menu. Click Apply.

This opens up the Bulk Edit option box for you to make changes.

Starting with the left side, you can click X to remove any post you do not wish to change. Next to that are the categories to choose from. Next are the rest, including post tags, author, comments, etc.

UPDATE: Before I get to the limitations, here is a quick video example of how to use the WordPress Bulk Edit feature for changing authors. It works the same as changing any of the options available on the Quick Edit feature, including adding tags, changing categories, etc.

This is also where you encounter your first set of limitations.

If you choose to add a category, click the checkbox for the category you want all the selected posts to be in. Be very certain about this as it will add the posts to that category, but not change any of the existing categories. There is currently no way to use the Bulk Edit feature to remove a post from a category, only to add categories.

If you choose to add tags, type the the words and phrases with a comma between them in the post tags box. Once you hit Update, the tags will be added to the post and the existing tags. Existing tags will not be changed and cannot be removed through Bulk Edit.

If you put the posts in a category or add a tag by mistake, you will have to manually go through and change each individual post using the Quick Edit or full Edit options.

Make your changes and click Update.

Another limitation to the Bulk Edit is the number of posts you can change at any one time. In one category on my WordPress site, I had 442 posts to change. WordPress limits the post view to sets of 20, leaving me with a lot of pages to apply the Bulk Edit to. There was once a unrecommended temporary hack to the core files to display all your posts at one time, but until WordPress offers a “show all posts” feature, we are left with changing these 20 by 20. To make this a little more fun, do what I did and put on an interesting movie or TV show on Hulu and plow through this tedious task.

Within two hour long television shows, I was able to retag all of the posts on that site, at least into general tags. I’ll work on adding more specific tags as I clean up the site. And trust me, there is a lot of cleaning to be done.

UPDATE

Thanks to Andrew Nacin who pointed out that the latest version of WordPress offers a feature to set the number of posts viewed on the Post panel through the Screen Options.

Well, at least I got some Hulu watching time in. This will definitely shorten my television time. Don’t know whether or not to be excited about this.

Do be careful when using this as it does take some time to generate all the posts when using a large number. Even on WordPress.com, I had to reload the page twice to generate a list of 50 posts. Most likely an issue on my end. If you don’t need it, don’t set it to a high number, or change it back when you are done.

Thanks, Andrew, and Otto for supplying a Plugin script to make this a more permanent fix. I love the WordPress Community.

I don’t understand. First, adding tags to post content is a natural part of the publishing flow. I’m only fixing what should have been there in the first place, if the tags had held during the migration to the latest version of WordPress. Second, if designed properly, the WordPress Theme would show excerpts on the tag pages, as they should on all multiple post pages, or post titles, whichever the user prefers.

I’m not giving the same tag to every since post. I’m going through all the posts in specific categories and assigning them the core tags that they would be in anyway. For example, every article I publish on photography would have “photography” as a tag. That’s a natural part of the process, micro-categorizing your content.

There are many ways to avoid duplicate content issues with Google, but this is not for Google but for my readers who want to get to the content they need by drilling through the tags.

My readers wouldn’t be using a search engine once they arrive on my site. My site is still under development, so while those pages may start with the same excerpts, this doesn’t change what I’m doing. And I’m rather stunned that you don’t understand how tags work. I recommend Tags and Tagging in WordPress.

“There were talks about implementing removal too but that was never a high priority. There are some UX questions too: shall we add extra boxes with the existing cats, tags, etc. (that may be more confusing) or shall we add a red checkbox above the existing cats saying ‘Remove checked categories from the selected posts’. Or perhaps radio buttons Add (default) / Remove.” [ref]

And that’s just referring to categories. Then when you introduce a raw text area for non-hierarchical types, it becomes quite a mess to run all the intersections.

This would be a great feature to introduce. If you use WordPress as site management tool as opposed to just a blog then you will see great benefit in this. Im going to mock something up and send it to the UX team and see what they think. I definitely have an incline towards how the tags are managed within the edit post screen i.e. you have the textarea and then underneath you have the current tags with an ‘X’ next to them so you can get rid of whichever ones you dont need/want.

I use WordPress every day, and I had no idea that setting for the view count existed. I’ve been doing everything 20 by 20 up to now, just like you, so that tip is worth it’s weight in gold! Thanks for a great read.

I’ve been using WordPress for two years and never knew about the bulk-edit until I found this post. I’m rewriting a number of my posts and needed to send the bulk of them back to the draft category. Thank you, thank you for saving me a ton of time.

I’m struggling with this, I’m not needing like you to add tags but am trying to change author names (my site has numerous authors and the previous editor just used his name whereas I would rather credit the actual author) Whenever I go to the bulk editing section I’m given all of the options you have shown in your image except for author. Do you have any idea why this should be?

You can bulk edit change authors. Simply check mark the posts appropriate to a specific author and choose bulk edit per the article instructions and change the name to whomever is appropriate from the user list. The authors must be in the user list. You cannot just type in their names.

It is on my WordPress blogs. You have to ADD them as a User. They won’t appear on the author list unless they are set as a User at least at the author level. I’m adding a how to video to the article, just for you. 😀

Looking forward to the video, although all of my authors are set as authors on my user section of the dashboard. Perhaps your video will bring something to the fore that is glaringly obvious but unnoticeable to me at present.

Hi Lorelle, you recently pointed me to this old post (from an old post of mine!=) ) and I wanted to say thank you, and also ask for a little advice if I may.

One thing I don’t see in the Bulk Edit options is a way to bulk edit the visibility of posts. In relaunching my website I took the drastic step of lumping most of my old posts into an ‘archived’ category and then using the Ultimate Category Excluder plugin to hide them. I’m starting again from a blank slate, but I didn’t want to delete them entirely.

They still show up in the previous/next links at the bottom of posts, howeve, and that was when I realised I could toggle the visibility to hide them entirely. I don’t fancy the prospect of editing them all individually however, although the exercise might be a good idea in case there are any posts I want to make public again..

The concept of archives is deprecated. There really isn’t a reason to “archive” anything. If you wish to remove them from the content, export them to a backup XML file for safe keeping and delete them.

There are WordPress Plugins that will help you move posts between categories. Give them a try.

6 Trackbacks/Pingbacks

I recently went through a major upgrade for Taking Your Camera on the Road, one of the oldest websites in the world, on WordPress since 2003, and the testing grounds for some of the earliest WordPress Plugins and Themes. Have I got a lot of lessons lea…

[…] checkbox is actually one of your most powerful allies in the pursuit of mass comment editing. In Cleaning Up Post Tags with WordPress Bulk Edit I go through the step-by-step details on how to use the bulk edit feature of WordPress to clean up […]