Bulk Delete

Description

Bulk Delete is a WordPress Plugin that allows you to delete posts, pages, attachments, users and meta fields in bulk based on different conditions and filters.

Features

The following conditions and filters are supported.

Deleting posts

This Plugin supports the following bulk delete options for deleting posts

  • Delete posts by category
  • Delete posts by tag
  • Delete posts by custom taxonomy
  • Delete posts by custom post type
  • Delete posts by url
  • Delete posts by custom field (Available as a Pro addon)
  • Delete posts by title (Available as a Pro addon)
  • Delete posts by duplicate title (Available as a Pro addon)
  • Delete all draft posts
  • Delete all pending posts
  • Delete all private posts
  • Delete all scheduled posts
  • Delete all posts from trash (Available as a Pro addon)

All the above options support the following filters

  • Post date greater than X days
  • Post date less than X days
  • Only public posts
  • Only private posts
  • Restrict to first N posts
  • Delete permanently or just move to trash
  • Schedule deletion of posts automatically (Available as a Pro addon)

Deleting posts by content

  • Delete posts by content (Available as a Pro addon)
  • Delete duplicate posts by title (Available as a Pro addon)
  • Delete posts based on whether it contains attachment or not (Available as a Pro addon)

Deleting posts by user

  • Delete posts by user role (Available as a Pro addon)
  • Delete posts by user (Available as a Pro addon)

Deleting pages

  • Delete all published pages
  • Delete all draft pages
  • Delete all pending pages
  • Delete all private pages
  • Delete all scheduled pages
  • Delete all pages from trash (Available as a Pro addon)

Like posts, all the above options support the following filters as well

  • Post date greater than X days
  • Post date less than X days
  • Only public pages
  • Only private pages
  • Restrict to first N pages
  • Delete permanently or just move to trash
  • Schedule deletion of pages automatically (Available as a Pro addon)

Deleting post revisions

  • Delete all post revisions

Deleting users

  • Delete users based on user role
  • Delete users based on user meta fields
  • Delete users who have not logged in in the last X days
  • Delete users based on their registered date

Deleting Meta Fields

  • Delete Post meta fields
  • Delete Comment meta fields
  • Delete User meta fields

Deleting Attachments

  • Delete Attachments (Available as a Pro addon)

Deleting other items

  • Delete Jetpack Contact Form Messages

More options coming soon 🙂

As you can see, the Plugin provide comprehensive options and filters to perform bulk deletion.

If you looking for just moving posts, instead of deleting, then use Bulk Move Plugin instead.

Pro Addons

The following are the popular pro addons that are available for purchase. The full list of pro addons is available at the plugin site.

  • Delete posts by custom field – Adds the ability to delete posts based on custom field. More details.
  • Delete posts by content – Adds the ability to delete posts based on content. More details.
  • Delete posts by attachment – Adds the ability to delete posts based on attachment More details.
  • Delete posts by title – Adds the ability to delete posts based on title. More details.
  • Delete posts by duplicate title – Adds the ability to delete posts based on duplicate title. More details.
  • Delete posts by user role – Adds the ability to delete posts based on user role. More details.
  • Delete posts by user – Adds the ability to delete posts based on user. More details.
  • Delete from trash – Adds the ability to delete posts and pages from trash. More details.
  • Scheduler Email – Sends email whenever a Bulk WP Scheduler runs. More details.
  • Scheduler for deleting posts Category – Adds the ability to schedule auto delete of posts based on category. More details.
  • Scheduler for deleting posts Tag – Adds the ability to schedule auto delete of posts based on tag. More details.
  • Scheduler for deleting posts by Custom Taxonomy – Adds the ability to schedule auto delete of posts based on custom taxonomy. More details.
  • Scheduler for deleting posts by Custom post type – Adds the ability to schedule auto delete of posts based on custom post type. More details.
  • Scheduler for deleting posts by Post Status – Adds the ability to schedule auto delete of posts based on post status like drafts, pending posts, scheduled posts etc. More details.
  • Scheduler for deleting pages by status – Adds the ability to schedule auto delete of pages based on status. More details.
  • Scheduler for deleting users by User Role – Adds the ability to schedule auto delete of users based on user role. More details.
  • Scheduler for deleting users by User Meta – Adds the ability to schedule auto delete of users based on user meta. More details.
  • Delete Post Meta Fields Pro – Adds the ability to delete post meta fields based on value and to schedule automatic deletion. More details.
  • Delete Comment Meta Fields Pro – Adds the ability to delete comment meta fields based on value and to schedule automatic deletion. More details.
  • Delete User Meta Fields Pro – Adds the ability to delete user meta fields based on value and to schedule automatic deletion. More details.
  • Delete attachment – Adds the ability to delete attachments More details.
  • Delete Jetpack Contact Form Messages Pro – Adds the ability to delete Jetpack Contact Form Messages based on filters and to schedule automatic deletion. More details.

Development

The development of the Plugin happens over at github. If you want to contribute to the Plugin, fork the project at github and send me a pull request.

If you are not familiar with either git or Github then refer to this guide to see how fork and send pull request.

If you are looking for ideas, then you can start with one of TODO items from the issue tracker 🙂

Support

  • If you have found a bug/issue or have a feature request, then post them in github issues
  • If you have a question about the plugin usage or need help to troubleshoot, then post about it in our BulkWP Support forums
  • If you have a question about any of the addon or need help to troubleshoot the addons, then post about it in our BulkWP Support forums
  • If you like the Plugin, then kindly leave a review/feedback at WordPress repo page. This will help more people to discover the plugin.
  • Checkout other WordPress Plugins that I have written
  • If anything else, then contact us in twitter.

Translation

The Plugin currently has translations for the following languages.

  • Dutch (Thanks Rene)
  • Brazilian Portuguese (Thanks Marcelo of Criacao de Sites em Ribeirao Preto)
  • German (Thanks Jenny Beelens)
  • Turkish Portuguese (Thanks Bahadir Yildiz)
  • Spanish (Thanks Brian Flores)
  • Italian (Thanks Paolo Gabrielli)
  • Bulgarian (Thanks Nikolay Nikolov)
  • Russian (Thanks Maxim Pesteev)
  • Lithuanian (Thanks Vincent G)
  • Hindi (Thanks Love Chandel)
  • Serbian (Thanks Diana)
  • Gujarati (Thanks Puneet)

The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know.

Credits

Thanks Martin Capodici for providing the code to implement the “delete specific page” feature.

Thanks to Time picker addon JavaScript library, which the Plugin uses.

Thanks to select2 JavaScript library, which the Plugin uses.

Readme Generator

This Readme file was generated using wp-readme, which generates readme files for WordPress Plugins.

Screenshots

  • The above screenshot shows how you can delete posts by post status. You can choose to delete published posts, draft posts, pending posts, scheduled posts, private posts or sticky posts.

  • The above screenshot shows how you can delete posts by category. You can choose the post type from which you want to delete the posts.

  • The above screenshot shows how you can delete posts by tag.

  • The above screenshot shows how you can delete posts by custom taxonomy. You can choose the post type, taxonomy name and the terms from which you want to delete the posts.

  • The above screenshot shows how you can delete posts by custom post type.

  • The above screenshot shows how you can delete pages by status. You can choose between published pages, draft pages, pending pages, scheduled pages and private pages.

  • The above screenshot shows how you can delete users by user role. You can also filter by user's registered date or login date.

  • The above screenshot shows how you can delete users by user meta You can also filter by user's registered date or login date.

  • The above screenshot shows how you can enable/disable different sections in the delete posts page of the Plugin. Similarly you can enable different sections in the other pages of the plugin like delete posts, delete pages, delete users, delete meta fields and delete misc.

  • The above screenshot shows how you can enable/disable different sections in the delete users page of the Plugin.

  • The above screenshot shows how you can enable/disable different sections in the delete meta fields page of the Plugin.

  • The above screenshot shows the different pages that are available in the plugin.

  • The above screenshot shows how you can schedule auto delete of posts. Note that this feature is available only when you buy pro addons.

Installation

The simplest way to install the plugin is to use the built-in automatic plugin installer. Go to plugins -> Add New and then enter the name of the plugin to automatically install it.

If for some reason the above method doesn’t work then you can download the plugin as a zip file, extract it and then use your favorite FTP client and then upload the contents of the zip file to the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

FAQ

Installation Instructions

The simplest way to install the plugin is to use the built-in automatic plugin installer. Go to plugins -> Add New and then enter the name of the plugin to automatically install it.

If for some reason the above method doesn’t work then you can download the plugin as a zip file, extract it and then use your favorite FTP client and then upload the contents of the zip file to the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

After installing the Plugin, I just see a blank page.

This can happen if you have huge number of posts and your server is very underpowered. Check your PHP error log to see if there are any errors and correct them. The most common problems are script timeout or running out of memory. Change your PHP.ini file and increase the script timeout and/or amount of memory used by PHP process. You can view the current values of these settings from the system info page which can be accessed by going to Bulk WP -> System Info.

In particular try to change the following settings

  • max_execution_time = 600 – Maximum execution time of each script, in seconds
  • max_input_time = 30 – Maximum amount of time each script may spend parsing request data
  • memory_limit = 256M – Maximum amount of memory a script may consume

You can also try to disable different sections of the Plugin, if you have huge number of posts.

How do I know what are the current values for these options configured in my server?

Access the System Info page using the menu Bulk WP -> System Info. The System info page displays the values for the different configuration options that are configured in your server.

How do I disable different sections of the Plugin

You can enable or disable different sections of the Plugin by choosing the required modules in the screen option. You can open screen options by clicking the link in the top right corner of the Plugin page.

Is it possible to restore the posts that I have deleted through the Plugin?

If you choose the option “Move to trash” then you can find them from trash. But if you choose “Delete permanently”, then it is not possible to retrieve the posts. So be very careful.

Is it possible that some Plugin are not compatible with Bulk Delete?

Yes. If a Plugin rewrites the query vars by using add_filter( 'pre_get_posts' ) then it may be incompatible with this Plugin.

If you find any Plugin with which Bulk Delete doesn’t work, then let me know and I will try to see if I can add support through some hack.

Is it possible to schedule deletion of posts?

The ability to schedule deletion of posts is available as a pro addon.

I have a question about the pro addons, how should I contact you?

You can contact us by posting about it in our support forum.

Reviews

Limited bulk delete capacity for users

Unfortunately, since I was trying to delete a large number of users I had to do it in 1000 user chunks, each of which took nearly a minute. After two runs I gave up since it was taking longer to do it with the plugin than it took from the users page.

Super handy plugin

I just deleted 1.2 million comments in less than a minute. I tried several other bulk deletion plugins and none of them could handle such a large number of comments. They all crashed.
Thank you for this amazing tool!

Ottimo per grandi migrazioni

Se state effettuando delle migrazioni, es da Joomla a WordPress, questo vi permetterà di cancellare in blocco tutti gli articoli… e di reimportarli in caso di errori.

Great to delete users quickly without any problem !

Hello,

I only used this great plugin to delete users, but it works flawlessly.

Just delete a maximum of 1000 users each time if you have too many, or your server will time out (I wonder what is the solution to this problem, worpdress always timeout with so many plugin, even on a fast powerful dedicated server ?)

Thank you again !

Does all the Heavy Lifting in less than a minute

Downloaded latest version 15 hours after most recent update.
This worked amazingly fast to remove 3345 spam subscribers in under a minute. So thankful to have found this time saver. The subscribers I wanted to keep I bumped their role up out of subscribers and then dumped the subscriber spam list.

Thank you Thank you Thank you

Read all 83 reviews

Contributors & Developers

“Bulk Delete” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Bulk Delete” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

2017-07-06 – v5.5.6 – (Dev time: 1 hour)

  • New Features

    • Ability to delete users who have empty value in a user meta field.
  • Enhancements

    • Added custom taxonomies in System Info.

2017-01-28 – v5.5.5 – (Dev time: 1 hour)

  • Bug Fixes
    • Fixed a bug that caused Jetpack messages to be not deleted properly.

2016-02-13 – v5.5.4 – (Dev time: 5 hours)

  • Bug Fixes

    • Security fix that prevents non-privileged users from deleting posts.
  • Enhancements

    • Lot of code refactoring to improve quality.

2015-11-02 – v5.5.3 – (Dev time: 3 hours)

  • New Features

    • Added the ability to delete users based on their registered date. (Issue #115)
  • Enhancements

    • Sanitize action post field before using it.
    • Updated Screenshots that are linked in the readme.
  • Bug Fixes

    • Fixed a bug that caused a warning while updating addons. (Issue #113)
    • Fixed typos and enhanced labels.

2015-10-05 – v5.5.2 (Dev time: 2 hours)

  • New Features

    • Added the ability to delete users who have never logged in.
  • Enhancements

    • Added compatibility with “Advanced Custom Fields Pro” plugin.
  • Bug Fixes

    • Fixed issue in deleting posts by category

2015-08-15 – v5.5.1 (Dev time: 2.5 hours)

  • New Features

    • Added actions that are executed before and after a query is executed.
    • Added actions that are executed before and after scripts and styles are enqueued.
  • Enhancements

    • Added compatibility with “The Events Calendar” plugin.
    • Added compatibility with “WooCommerce” plugin. (Issue #111)
    • Display warning in the System Info page if certain required options are disabled. (Issue #106)
    • Added information about “WP_CRON_LOCK_TIMEOUT” to System Info

2015-07-21 – v5.5 (Dev time: 50 hours)

  • New Features

    • Added the ability to delete users based on user meta. (Issue #79)
    • Improved the UI of dropdowns. (Issue #101)
    • (Addon) Added the ability to delete attachments. (Issue #98)
  • Enhancements

    • Tweaked the code that generates the UI and lot of hidden improvements.
    • Tweaked the code that retrieves Mysql version. (Issue #102)
    • Tweaked the license handling code. (Issue #92)
    • Tweaked the build process
    • Use compressed JS and CSS files for better performance. (Issue #62)

2015-03-03 – v5.4.2 (Dev time: 5.0 hours)

  • Tweak: Improve performance of DB queries to prevent timeouts. (Issue #93)
  • Tweak: Add details about different post types in system info. (Issue #100)
  • Tweak: Add details about timezone settings in system info. (Issue #100)

2015-02-14 – v5.4.1 – (Dev time: 0.5 hours)

  • Tweak: Use Google CDN for jQuery UI CSS, instead of ASP.NET

2014-09-14 – v5.4 – (Dev time: 20 hours)

  • New: Added the ability to delete post meta fields (Issue #43)
  • New: Added the ability to delete comment meta fields (Issue #70)
  • New: Added the ability to delete user meta fields (Issue #87)
  • New: (Addon) Added the ability to delete posts based on attachment
  • New: Added the ability to hook into JavaScript message, date picker and validation (Issue 82, 83, 84)
  • New: Prevent PHP from timing out while performing bulk operations(Issue #81)

  • Tweak: Group memory related info together in system info output

  • Tweak: Tweak the warning and error messages that are shown to the users
  • Tweak: Remove hard dependency on “Bulk Delete From Trash” addon in code
  • Tweak: Tweak the admin UI for WordPress 4.0 and added custom plugin icons
  • Tweak: Tweak the code that handles automatic update of addons

2014-08-17 – v5.3 – (Dev time: 17 hours)

  • New: Ability to delete Jetpack Contact Form Messages (Issue #72)
  • New: New Addon to send email whenever a Bulk WP Scheduler runs
  • New: Settings screen for addons (Issue #78)
  • New: Add setting helper functions for addons

  • Tweak: Tweak the names of the menu items (Issue #73)

  • Tweak: Add information about DISABLE_WP_CRON in system info
  • Tweak: Tweak labels in Scheduled Jobs page (Issue #71)
  • Tweak: Removed unused variable
  • Tweak: Removed old compatibility code for The Events Calendar plugin
  • Tweak: Add filters to extend menu items (Issue #74)
  • Tweak: Add filters to extend meta boxes in each page (Issue #75)
  • Tweak: Remove upgraded from from system info (Issue #77)

  • Bug: Fixed a warning that happened because of duplicate call to add_meta_boxes

2014-07-03 – v5.2 – (Dev time: 8 hours)

  • New: Ability to delete users in batches (Issue #47)
  • New: A new addon to delete posts based on users (Issue #6)

2014-06-14 – v5.1 – (Dev time: 8 hours)

  • New: Added the “Delete posts from trash” addon (Issue #65)

  • Tweak: Added EMPTY_TRASH_DAYS to system info page (Issue #67)

  • Tweak: Change the contextual help content for admin screens (Issue #68)

  • Bug: Added compatibility for PHP version 5.2.4 (Issue #66)

  • Bug: Fixed a bug in JavaScript validation in “Delete by URL” module (Issue #69)

2014-06-12 – v5.0.2 – (Dev time: 1 hours)

  • Bug: Added compatibility for PHP version 5.2.4 (Issue #64)

2014-06-10 – v5.0.1 – (Dev time: 1 hours)

  • Fix: Deleting users had as issue that was introduced in v5.0

2014-06-10 – v5.0 – (Dev time: 60 hours)

  • New: Add the ability to delete posts by duplicate title (#56)
  • New: Add a new page that displays system information for debugging
  • New: Add the ability to handle addon license
  • New: Use add_settings_error method to display information to users

  • Tweak: Make Bulk_Delete class singleton

  • Tweak: Move all deprecated functions and code to a separate file
  • Tweak: Add the ability to filter text displayed in admin footer
  • Tweak: Change the menu text for Schedule page
  • Tweak: Move delete page modules to a separate page
  • Tweak: Refactored the way request was handled
  • Tweak: Update screenshots
  • Tweak: Handle expired license properly

2014-01-26 – v4.4.3 – (Dev time: 1.5 hours)

  • Tweak: Ability to delete posts from non-public post types as well
  • Fix: Fix the height of the sidebar

2014-01-05 – v4.4.2 – (Dev time: 1.5 hours)

  • Tweak: Move request processing code for deleting by custom field to addon
  • Fix: Deleting first x posts deletes all posts while deleting by category (#44)
  • Fix: Posts are moved to trash even if “Delete permanently” option is selected (#45)

2013-12-18 – v4.4.1 – (Dev time: 0.5 hours)

  • Fix: Bulk Delete menu overrides other menus at the same position

2013-12-14 – v4.4 – (Dev time: 10 hours)

  • New: Ability to delete all published posts from “Post Status” module
  • New: Ability to delete all sticky posts from “Post Status” module
  • New: Ability to delete posts by title
  • Tweak: Moved all option page to a separate top menu
  • Tweak: Tweak UI for WordPress 3.8
  • Fix: Fix undefined notices and strict warnings

2013-12-08 – v4.3 – (Dev time: 2 hours)

  • New: Ability to delete custom post type posts by categories
  • New: Ability to delete custom post type posts by custom taxonomy
  • Fix: Fix link to “Custom Field” Addon

2013-11-11 – v4.2.2 – (Dev time: 1 hour)

  • Fix: Bug in deleting custom post types with hypen

2013-11-07 – v4.2.1 – (Dev time: 0.5 hours)

  • Explicitly mark static methods as static

2013-10-22 – v4.2 – (Dev time: 3 hours)

  • Add the ability to custom post type posts by post status

2013-10-12 – v4.1 – (Dev time: 6 hours)

  • Add the “delete by custom field” pro addon

2013-10-07 – v4.0.2 – (Dev time: 1 hours)

  • Fix issue in displaying meta boxes
  • Show taxonomy label instead of slug
  • Fix issue in deleting posts by custom taxonomy

2013-09-12 – v4.0.1 – (Dev time: 1 hours)

  • Fix JavaScript bug that prevented deleting posts by days and in batches

2013-09-09 – v4.0 – (Dev time: 25 hours)

  • Add the ability to delete users
  • Move menu items under tools

2013-07-07 – v3.6.0 – (Dev time: 2 hours)

  • Change minimum requirement to WordPress 3.3
  • Fix compatibility issues with “The event calendar” Plugin

2013-06-01 – v3.5 – (Dev time: 10 hours)

  • Added support to delete custom post types
  • Added Gujarati translations
  • Ignore sticky posts when deleting drafts

2013-05-22 – v3.4 – (Dev time: 20 hours)

  • Incorporated Screen API to select/deselect different sections of the page
  • Load only sections that are selected by the user

2013-05-11 – v3.3 – (Dev time: 10 hours)

  • Enhanced the deletion of posts using custom taxonomies
  • Added the ability to schedule auto delete of taxonomies by date
  • Cleaned up all messages that are shown to the user
  • Added on screen help tab

2013-05-04 – v3.2 – (Dev time: 20 hours)

  • Added support for scheduling auto delete of pages
  • Added support for scheduling auto delete of drafts
  • Fixed issue in deleting post revisions
  • Move post revisions to a separate section
  • Better handling of post count to improve performance
  • Moved pages to a separate section
  • Added ability to delete pages in different status
  • Added the option to schedule auto delete of tags by date
  • Fixed a bug which was not allowing categories to be deleted based on date

2013-04-28 – v3.1 – (Dev time: 5 hours)

  • Added separate delete by sections for pages, drafts and urls
  • Added the option to delete by date for drafts, revisions, future posts etc
  • Added the option to delete by date for pages

2013-04-27 – v3.0 – (Dev time: 10 hours)

  • Added support for pro addons
  • Added GUI to see cron jobs

v2.2.2 (2012-12-20) (Dev time: 0.5 hour)

  • Removed unused wpdb->prepare() function calls

v2.2.1 (2012-10-28) (Dev time: 0.5 hour)

  • Added Serbian translations

v2.2 (2012-07-11) (Dev time: 0.5 hour)

  • Added Hindi translations
  • Added checks to see if elements are present in the array before accessing them.

v2.1 (2012-04-07) Dev Time: 1 hour

  • Fixed CSS issues in IE
  • Added Lithuanian translations

v2.0 (2012-04-01) Dev Time: 10 hours

  • Fixed a major issue in how dates were handled.
  • Major UI revamp
  • Added debug information and support urls

v1.9 (2012-03-16)

  • Added support for deleting by permalink. Credit Martin Capodici
  • Fixed issues with translations
  • Added Russian translations

v1.8 (2012-01-31)

  • Added roles and capabilities for menu

v1.7 (2012-01-12)

  • Added Bulgarian translations

v1.6 (2011-11-28)

  • Added Italian translations

v1.5 (2011-11-13)

  • Added Spanish translations

v1.4 (2011-08-25)

  • Added Turkish translations

v1.3 (2011-05-11)

  • Added German translations

v1.2 (2011-02-06)

  • Added some optimization to handle huge number of posts in underpowered servers

v1.1 (2011-01-22)

  • Added support to delete posts by custom taxonomies
  • Added Dutch Translation
  • Added Brazilian Portuguese Translation

v1.0 (2010-06-19)

  • Proper handling of limits.

v0.8 (2010-03-17)

  • Added support for private posts.

v0.7 (2010-02-21)

  • Added an option to delete posts directly or send them to trash.
  • Added support for translation.

v0.6 (2009-07-22)

  • Added option to delete all scheduled posts.

v0.5 (2009-07-21)

  • Added option to delete all pending posts.

v0.4 (2009-07-05)

  • Added option to delete by date.

v0.3 (2009-04-05)

  • Prevented drafts from deleted when only posts are selected

v0.2 (2009-02-03)

  • Fixed issues with paging

v0.1 (2009-02-02)

  • First version