WPRepublic Bulk Category Removal for WooCommerce
WPRepublic Bulk Category Removal for WooCommerce
Description
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
Installation
From your WordPress dashboard:
- Navigate to ‘Plugins > Add New’.
- Search for ‘WPRepublic Bulk Category Removal for WooCommerce’.
- Click ‘Install Now’.
- Activate the plugin.
- Navigate to ‘WooCommerce > WPRepublic Bulk Category Removal’ to get started.
Faq
Yes. The plugin defaults to Dry Run mode. This means you can press “Run” and see exactly what would happen in a log file, without actually deleting anything. We strongly recommend doing this first.
No. The plugin deletes all the products inside the selected categories. The categories themselves (the terms) remain on your site, but they will be empty (0 products).
If you are trying to delete 10,000+ products, a web browser might “time out” (stop working) halfway through. WP-CLI runs directly on the server, making it much faster and reliable for massive stores.
Reviews
Changelog
1.1.0
- REBRAND: Renamed plugin to WPRepublic Bulk Category Removal for WooCommerce to reflect its new modular architecture.
- FEATURE: Prepared codebase for future add-on modules.
- UPDATE: Updated WP-CLI commands to
wp wpr-bulk-category-removal-woocommerce.
1.0.6
- FEATURE: Added Search, Sort, and Pagination to the admin table.
1.0.0
- Initial release.