WordPress currently applies bulk actions and edits only to posts shown on the posts screen at a given time. If a site has more than a few hundred posts, it's not really feasible to display them all on the current posts screen – load speeds go down like crazy even on dedicated hardware.
So what happens if a content manager wants to delete all their posts or move them to the trash? (This is my use case I've found myself running into on multiple projects, though there may be others.) They can:
- Tell WordPress to show them many posts at a time (100-500?) , then try to delete them. But the delete command is sent in the URL string, so you had better not delete so many that the web server rejects a string for being too long.
- Page endlessly through a smaller amount of posts and delete them. Which is less likely to generate errors, but still takes a ton of repetitive human action time for a scriptable task.
- Install a plugin to remove posts. But only if they have the ability and permissions to do so. (This is a problem on, say, WordPress.com or other environments where the user isn't an administrator.)
- Circumvent WordPress and drop posts from the database. Nice and fast, but (a) not everyone has DB access and (b) hacking on core tables is dangerous business.
I think Gmail has a quite elegant solution for bulk actions in their table of messages. "Select all" defaults to just selecting all emails onscreen, but additionally shows this option to select every post in the system. (If the user chooses to do so, they receive this confirmation.)
Could WordPress add something similar to the core with bulk edits or actions? I can think of several upsides:
- Reduction of load and amount of queries to display many pages worth of posts then perform many DB updates to modify them (all with additional request time and browser load to display many posts)
- Ability to mass manage content without the need for plugins
- Reduction of information that needs to be passed between client, web server, PHP, MySQL
- Doesn't tempt me to just drop rows manually in MySQL
In thinking of this issue, I can already see a few challenges that others might be better off to address:
- Scalability. I want to just do a bulk action on ~1,500 posts at a time, but what about a site that has far more posts and wants to use the same functions? (Personally, I think the current way sucks just as much for both, so a reasonable way to handle large requests would be an improvement regardless.
- Resource demand. The current way defaults to 20 posts per page and keeps most requests nice and short. Depending on how it's implemented, might it require a long-executing PHP process with lots of memory needs? I think this would be far more likely with a bulk edit like adding or deleting categories.
What say ye? To me this kind of content management task, while not an everyday one, is best solved in core, since not all content managers have access to plugin alternatives.