Cleaning up multiple posts in WordPress

How many times has this happened to you: You have to clean up or modify the code or content in dozens (or more) posts in WordPress, but these posts are just a subset of all the posts in WordPress?

This seems to happen to me all the time. I usually start out searching for the posts I need to clean up, then clicking on the top one, editing it, and then publishing it.

At that point, I have to go back, perform my search again to select the posts that need editing, and then choose one to edit. Ugh. Double ugh that Movable Type retains your searched-for posts, so in contrast, it makes you feel as if you are swimming through wet concrete when using WordPress.

I haven’t yet figured a way around this issue, but there is a way to mitigate it.

First, you search to find the posts that need editing. There’s no getting around this step.

But, once you get the results listing, instead of opening the one at a time in the same window, click to edit each post in a new tab (or window, if you prefer). When you reach your personal limit of open tabs or windows, edit those posts, closing them as you finish each one.

After you’ve edited all the posts and closed each tab/window, you’ll be back at the results page. If you remember where you left off, you can repeat the process. I never do, so I click to see the next page of results and start over there, opening tabs (or windows, as the case may be). When I reach the end of the listings, I perform the search again, which calls up the remaining posts that need to be edited, although in some cases it also pulls up posts that I thought I’d edited before. Either way, of course, they need to be looked at.

Editing multiple posts this way dramatically reduces the number of times you need to re-perform your search to cull out the posts needing attention.

P.S. If you get a bunch of tabs / windows open and notice that WordPress’ AJAX interface is no longer working for you, you probably have a caching issue. It could be in your browser, but it could also be with Cloudflare or Incapsula. Quitting and relaunching your browser might clear it up, but if not, trying disabling JavaScript caching between you and your server. If that doesn’t work, add this to the end of your wp-config.php file:

/** Disable Javascript Concatenation */
define( 'CONCATENATE_SCRIPTS', false );

For more information, see Editing wp-config.php.

Advertisements