WPRepublic Bulk Category Removal for WooCommerce
Building a WooCommerce store is easy. Maintaining a massive one is hard.
We built WPRepublic Bulk Category Removal for WooCommerce to be the Swiss Army knife that every store administrator wishes they had. This plugin is designed to host a variety of essential add-ons and utilities, evolving into a complete operations center for your shop.
The First Module: The “Bulk Delete” Solution
Have you ever tried to delete a product category in WooCommerce, only to realize the products inside it stay behind?
You are left with thousands of orphaned items, and the default interface only lets you delete them 20 at a time. It is slow, it times out, and it frustrates even the most patient admins. For years, there wasn’t a simple, native way to say: “Delete this category AND everything inside it.”
Now there is.
The WPRepublic Bulk Category Removal Cleanup Module allows you to select specific categories and surgically remove all products contained within them.
Why this is the tool you’ve been looking for:
- The “Missing” Feature: Finally, you can bulk delete thousands of products based on their category with a few clicks.
- Deep Cleaning: It doesn’t just delete the post. It scrubs the database of orphaned relationships,
postmeta, andwc_product_meta_lookupentries, keeping your database lean and fast. - Safety First: Includes a Dry Run mode (enabled by default). Simulate the entire process and read the logs before you delete a single byte of data.
🚀 Supercharged with WP-CLI
For developers and site reliability engineers, the graphical interface is just the beginning. WPRepublic Bulk Category Removal comes with robust WP-CLI integration out of the box.
- No Timeouts: managing 50,000 products? Run the cleanup from the terminal. It is faster, more stable, and immune to browser timeouts (PHP max_execution_time).
- Secure & Scriptable: Automate your store maintenance via cron jobs or shell scripts securely.
- Dry Runs in Terminal: Test your cleanup logic directly in the command line before executing.
What’s Next?
This is just the beginning. WPRepublic Bulk Category Removal for WooCommerce is being actively developed to include more modules for bulk editing, customer management, and store optimization.
WARNING: This is a powerful, destructive tool. Always perform a full database backup before running a live cleanup.
WP-CLI Commands
Use the power of the command line to manage your store cleanup efficiently.
1. List Categories
View a table of all product categories, their IDs, slugs, and product counts.
wp wpr-bulk-category-removal-woocommerce list-categories
2. Run Cleanup
Execute the cleanup process for specific categories.
Options:
--term-id=<ids>: A comma-separated list of category IDs to process.--category-slug=<slugs>: A comma-separated list of category slugs.--dry-run: (Optional) Simulate the cleanup without deleting data.
Examples:
Safe Simulation (Dry Run): wp wpr-bulk-category-removal-woocommerce run –category-slug=temp-collection –dry-run
Live Cleanup (By ID): wp wpr-bulk-category-removal-woocommerce run –term-id=152,189
Live Cleanup (By Slug): wp wpr-bulk-category-removal-woocommerce run –category-slug=clothing,accessories