Overview
↑ Back to topShop Cleaner is a comprehensive WooCommerce store cleanup plugin. It helps you remove unwanted products, find and eliminate duplicate listings, clean orphaned media files, delete inactive customer accounts, and optimize your database — all from a single, modern interface integrated into WooCommerce settings.
Requirements:
- WordPress 6.4 or higher
- WooCommerce 8.0 or higher
- PHP 7.4 or higher
Installation
↑ Back to top- Download the plugin ZIP file from your WooCommerce.com account.
- In your WordPress admin, go to Plugins > Add New > Upload Plugin.
- Select the ZIP file and click Install Now.
- Click Activate Plugin.
- The plugin interface is available at WooCommerce > Settings > Advanced > Shop Cleaner.
Note: WooCommerce must be installed and activated before activating Shop Cleaner. If WooCommerce is not active, you will see an admin notice prompting you to install it.
Getting Started
↑ Back to topAfter activation, navigate to WooCommerce > Settings > Advanced > Shop Cleaner. You will see a tabbed interface with seven sections:
- Products — Filter and remove products
- Duplicates — Find and remove duplicate products
- Media — Detect and delete orphaned product images
- Database — Optimize your WooCommerce database
- Customers — Remove inactive customer accounts
- Logs — View the history of all cleanup operations
- Settings — Configure plugin behavior and scheduling
We recommend starting with the Settings tab to configure your preferences before running any cleanup operations.
Product Cleanup
↑ Back to topThe Products tab lets you filter your product catalog and remove matching products in batches.
Filtering Products
↑ Back to topUse any combination of the following filters to narrow down which products to target:
| Filter | Options | Description |
|---|---|---|
| Category | Any product category | Filter by product category slug |
| Product Type | Simple, Variable, Grouped, External | Filter by WooCommerce product type |
| Status | Published, Draft, Pending, Private | Filter by post status |
| Stock Status | In Stock, Out of Stock, On Backorder | Filter by inventory status |
| Created Before | Date picker | Only include products created before this date |
| Min Price | Numeric value | Only include products at or above this price |
| Max Price | Numeric value | Only include products at or below this price |
| Tag | Any product tag | Filter by product tag slug |
Scanning
↑ Back to topClick Scan to preview all products matching your filters. The preview table shows:
- Product ID
- Thumbnail image
- Product name
- SKU
- Product type
- Status
- Stock status
- Price
- Creation date
Cleaning
↑ Back to topAfter reviewing the scan results, choose an action:
- Move to Trash — Moves products to the WordPress trash. They can be recovered from the trash at any time.
- Delete Permanently — Permanently removes products. This action cannot be undone.
Products are processed in batches (configurable in Settings, default: 20). A progress indicator shows how many items have been processed.
Emptying Trash
↑ Back to topUse the Empty Trash button to permanently delete all products currently in the WordPress trash.
Image Deletion
↑ Back to topWhen the Delete images with products setting is enabled, featured images and gallery images associated with deleted products are also removed.
Duplicate Finder
↑ Back to topThe Duplicates tab helps you identify and remove duplicate product listings.
Detection Methods
↑ Back to topChoose how duplicates are detected:
- By SKU — Products with identical SKU values are grouped together.
- By Title — Products with identical names are grouped together.
- By Both — Products matching by either SKU or title are found and deduplicated.
Scanning for Duplicates
↑ Back to topClick Scan for Duplicates to run the detection. Results are displayed as groups, with each group containing all products that match. For each product you can see:
- Product ID
- Product name
- SKU
- Product type
- Status
- Price
- Creation date
- Thumbnail image
The scan displays up to 200 duplicate groups.
Cleaning Duplicates
↑ Back to topConfigure cleanup options:
- Keep — Choose to keep the oldest or newest product in each group (based on creation date). All other products in the group will be removed.
- Action — Choose Move to Trash or Delete Permanently.
Click the cleanup button to process all duplicate groups at once.
Media Cleanup
↑ Back to topThe Media tab scans for orphaned product images and lets you remove them to recover storage space.
What Is an Orphaned Image?
↑ Back to topAn orphaned image is a media file that is attached to a product but is not currently used as:
- The product’s featured image
- An image in the product’s gallery
These images remain on your server and in your media library but serve no purpose.
Scanning for Orphaned Images
↑ Back to topClick Scan for Orphaned Images. The results table shows:
- Image ID
- Thumbnail preview
- Filename
- File title
- File size
- Upload date
Deleting Orphaned Images
↑ Back to topYou can:
- Delete All Orphaned — Remove all detected orphaned images at once.
- Select individual images — Choose specific images to delete.
Deleted images are permanently removed from the media library and the server.
Database Cleanup
↑ Back to topThe Database tab provides seven cleanup operations that target different types of stale data in your WooCommerce database.
Cleanup Types
↑ Back to top| Type | What It Finds | What It Does |
|---|---|---|
| Orphaned Variations | Product variations whose parent product has been deleted | Permanently deletes the orphaned variation posts |
| Orphaned Post Meta | Metadata rows referencing posts that no longer exist | Deletes the orphaned postmeta entries |
| Empty Categories | Product categories with zero products assigned (excludes the default “Uncategorized” category) | Deletes the empty category terms |
| Empty Tags | Product tags with zero products assigned | Deletes the empty tag terms |
| Expired Transients | WooCommerce transient cache entries that have expired | Deletes the expired transient data from the options table |
| Expired Coupons | Published coupons with an expiration date in the past | Permanently deletes the expired coupon posts |
| Expired Sessions | WooCommerce session records that have passed their expiry time | Deletes expired rows from the sessions table |
How to Use
↑ Back to topThe Database tab displays a scan count for each cleanup type. Click Clean next to any type to remove those items. After cleanup, the count will drop to zero.
Each cleanup type is independent — you can clean one, several, or all types as needed.
Customer Cleanup
↑ Back to topThe Customers tab helps you find and remove inactive customer accounts.
Filter Types
↑ Back to top| Filter | Description |
|---|---|
| No Orders | Customers who have never placed an order |
| Failed Orders Only | Customers whose every order has a failed or cancelled status. You can set a minimum number of failed orders as a threshold. |
Additional Filters
↑ Back to top- Registered Before — Only include customers who registered before a specific date.
- Exclude Roles — By default, Administrator and Shop Manager roles are always excluded from cleanup.
Scanning
↑ Back to topClick Scan to preview matching customers. The table shows:
- User ID
- Username
- Email address
- Display name
- Registration date
- Order count
- Last order date
- User roles
Deleting Customers
↑ Back to topSelect customers or use the bulk action to delete all matching customers. Before deletion:
- The customer’s posts and content are reassigned to an administrator account.
- The currently logged-in user is never deleted.
- Users with Administrator or Shop Manager roles are never deleted.
Customer deletion is permanent and cannot be undone.
Operation Logs
↑ Back to topThe Logs tab provides a complete history of every cleanup operation performed by the plugin.
Log Records
↑ Back to topEach log entry includes:
- Timestamp — When the operation was performed
- Operation Type — Products, Duplicates, Media, Database, or Customers
- Action Taken — The specific action (trash, delete, empty trash, etc.)
- Items Affected — How many items were processed
- Item Details — Detailed information about each affected item (stored as JSON)
- Filters Used — Which filters were applied when the operation was triggered
- User — The WordPress user who performed the operation
Filtering Logs
↑ Back to topUse the following filters to find specific log entries:
- Operation Type — Show only logs for a specific cleanup type
- Date Range — Filter by start and end dates
Log Statistics
↑ Back to topThe Logs tab displays summary statistics:
- Total number of operations performed
- Total items affected across all operations
- Breakdown by operation type (count and items per type)
- Operations performed in the last 30 days
Clearing Logs
↑ Back to topClick Clear All Logs to remove all log records. This action requires confirmation.
Log Retention
↑ Back to topLogs are automatically cleaned up based on the Log Retention Days setting (default: 30 days). Old logs are removed after each scheduled cleanup run.
Scheduled Cleanups
↑ Back to topShop Cleaner can automate recurring cleanup operations using WordPress Cron (WP-Cron).
Enabling Scheduling
↑ Back to top- Go to the Settings tab.
- Toggle Enable Scheduled Cleanups to on.
- Select a Frequency: Daily, Weekly, or Monthly.
- Choose which Cleanup Types to include:
- Products
- Media
- Database
- Customers
- Save your settings.
How Scheduled Cleanups Work
↑ Back to topWhen a scheduled cleanup runs:
- Products — Cleans products matching your saved product filters with a batch size of 100.
- Media — Scans and deletes all orphaned product images.
- Database — Runs all seven database cleanup types sequentially.
- Customers — Removes customers with zero orders (using the “No Orders” filter).
Every scheduled run is fully logged in the Logs tab with all details.
Disabling Scheduling
↑ Back to topToggle the Enable Scheduled Cleanups setting to off. The scheduled WP-Cron event will be removed immediately.
Note: WP-Cron relies on site visits to trigger scheduled events. If your site has very low traffic, scheduled cleanups may not run exactly on time. Consider setting up a real cron job on your server for more precise scheduling.
Settings
↑ Back to topThe Settings tab lets you configure the plugin’s behavior.
| Setting | Default | Description |
|---|---|---|
| Delete Images with Products | No | When enabled, featured images and gallery images are deleted along with their products |
| Batch Size | 20 | Number of items processed per batch during cleanup (range: 10–100) |
| Confirm Permanent Delete | Yes | Show a confirmation dialog before any permanent deletion |
| Enable Scheduled Cleanups | No | Activate automated cleanup scheduling |
| Schedule Frequency | Weekly | How often scheduled cleanups run (Daily, Weekly, or Monthly) |
| Schedule Actions | Products | Which cleanup types to include in scheduled runs |
| Schedule Product Filters | None | Product filters to apply during scheduled product cleanup |
| Log Retention Days | 30 | How many days to keep operation log records |
REST API
↑ Back to topShop Cleaner provides a full REST API for programmatic access. All endpoints are under the sc/v1 namespace and require the manage_woocommerce capability.
Authentication
↑ Back to topAll requests must be authenticated with a user who has the manage_woocommerce capability. Use standard WordPress REST API authentication methods (cookie with nonce, application passwords, or OAuth).
Endpoints
↑ Back to topSettings
| Method | Endpoint | Description |
|---|---|---|
GET | /wp-json/sc/v1/settings | Get current plugin settings |
POST | /wp-json/sc/v1/settings | Update plugin settings |
Products
| Method | Endpoint | Description |
|---|---|---|
POST | /wp-json/sc/v1/products/scan | Scan products matching filters |
POST | /wp-json/sc/v1/products/clean | Clean one batch of matching products |
POST | /wp-json/sc/v1/products/empty-trash | Permanently delete all trashed products |
Scan/Clean Parameters:
| Parameter | Type | Description |
|---|---|---|
category | string | Product category slug |
product_type | string | simple, variable, grouped, or external |
status | string | publish, draft, pending, or private |
stock_status | string | instock, outofstock, or onbackorder |
date_before | string | Date in YYYY-MM-DD format |
min_price | number | Minimum product price |
max_price | number | Maximum product price |
tag | string | Product tag slug |
action | string | trash or delete (clean endpoint only) |
delete_images | boolean | Delete associated images (clean endpoint only) |
Duplicates
| Method | Endpoint | Description |
|---|---|---|
POST | /wp-json/sc/v1/duplicates/scan | Find duplicate products |
POST | /wp-json/sc/v1/duplicates/clean | Remove duplicate products |
Scan Parameters:
| Parameter | Type | Description |
|---|---|---|
criteria | string | sku, title, or both |
Clean Parameters:
| Parameter | Type | Description |
|---|---|---|
groups | array | Duplicate groups from scan results |
keep | string | oldest or newest |
action | string | trash or delete |
Media
| Method | Endpoint | Description |
|---|---|---|
POST | /wp-json/sc/v1/media/scan | Scan for orphaned product images |
POST | /wp-json/sc/v1/media/clean | Delete orphaned images |
Clean Parameters:
| Parameter | Type | Description |
|---|---|---|
ids | array | (Optional) Specific image IDs to delete. If omitted, all orphaned images are deleted. |
Database
| Method | Endpoint | Description |
|---|---|---|
POST | /wp-json/sc/v1/database/scan | Get counts for all cleanup types |
POST | /wp-json/sc/v1/database/clean | Clean a specific database type |
Clean Parameters:
| Parameter | Type | Description |
|---|---|---|
type | string | Required. One of: orphaned_variations, orphaned_postmeta, empty_categories, empty_tags, expired_transients, expired_coupons, expired_sessions |
Customers
| Method | Endpoint | Description |
|---|---|---|
POST | /wp-json/sc/v1/customers/scan | Scan customers matching filters |
POST | /wp-json/sc/v1/customers/clean | Delete customers |
Parameters:
| Parameter | Type | Description |
|---|---|---|
filter_type | string | no_orders or failed_orders |
registered_before | string | Date in YYYY-MM-DD format |
min_failed_orders | number | Minimum failed orders threshold (for failed_orders filter) |
customer_ids | array | Specific customer IDs to delete (clean endpoint only) |
Logs
| Method | Endpoint | Description |
|---|---|---|
GET | /wp-json/sc/v1/logs | Get log records with pagination |
DELETE | /wp-json/sc/v1/logs | Clear all logs |
GET Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
per_page | number | 20 | Records per page (max: 100) |
operation_type | string | — | Filter by operation type |
date_from | string | — | Start date (YYYY-MM-DD) |
date_to | string | — | End date (YYYY-MM-DD) |
Statistics
| Method | Endpoint | Description |
|---|---|---|
GET | /wp-json/sc/v1/stats | Get cleanup statistics |
Response:
{
"total_operations": 42,
"total_items": 1250,
"by_type": {
"products": { "operations": 10, "items": 500 },
"media": { "operations": 8, "items": 200 },
"database": { "operations": 15, "items": 400 },
"customers": { "operations": 5, "items": 100 },
"duplicates": { "operations": 4, "items": 50 }
},
"recent_30_days": 12
}
Compatibility
↑ Back to topWooCommerce HPOS
↑ Back to topShop Cleaner is fully compatible with WooCommerce High-Performance Order Storage (HPOS / Custom Order Tables). All customer and order queries automatically detect whether HPOS is enabled and use the appropriate query method.
WordPress & WooCommerce Versions
↑ Back to top- WordPress: 6.4 through 6.9.1 (tested)
- WooCommerce: 8.0 through 10.5.1 (tested)
- PHP: 7.4 and above
Themes
↑ Back to topShop Cleaner has no frontend output. It operates entirely within the WordPress admin, so it is compatible with any WordPress or WooCommerce theme.
Languages
↑ Back to topThe plugin is fully internationalized and translation-ready. It is available in 19 languages: English (US), Arabic, Danish, German, Greek, Spanish, Finnish, French, Hebrew, Indonesian, Italian, Japanese, Korean, Dutch, Portuguese (Brazil), Portuguese (Portugal), Russian, Swedish, and Turkish.
Frequently Asked Questions
↑ Back to topCan I undo a cleanup operation?
↑ Back to topProducts moved to trash can be restored from the WordPress trash at any time. Permanently deleted items (products, media, customers, database entries) cannot be recovered. We recommend using the trash option first if you are unsure.
Will the plugin modify my store automatically on activation?
↑ Back to topNo. The plugin does not perform any cleanup operations on activation. All operations must be triggered explicitly from the settings page or through a scheduled cleanup that you configure.
Is it safe to use on a live store?
↑ Back to topYes. Shop Cleaner includes multiple safety features: trash before permanent delete, confirmation dialogs, batch processing, role protection for admins, and a complete audit log. We recommend testing on a staging site first and always maintaining backups.
Will this slow down my store?
↑ Back to topNo. Shop Cleaner only runs when you trigger a cleanup operation or when a scheduled cleanup executes. It does not add any overhead to your storefront or regular admin operations.
What happens to customer content when I delete customers?
↑ Back to topBefore a customer account is deleted, all of their posts and content are reassigned to an administrator account. This ensures no content is lost.
Can I schedule different cleanup types at different frequencies?
↑ Back to topThe current scheduling system uses a single frequency for all selected cleanup types. All selected types run together on the chosen schedule (daily, weekly, or monthly).
Does the plugin work with WooCommerce HPOS?
↑ Back to topYes. Shop Cleaner declares full compatibility with WooCommerce High-Performance Order Storage and automatically uses the correct query methods.
How do I access the REST API?
↑ Back to topAll endpoints are under the sc/v1 namespace. You need to authenticate as a user with the manage_woocommerce capability. See the REST API section for full endpoint documentation.
Uninstalling
↑ Back to topWhen you deactivate the plugin:
- Scheduled cleanup events are removed.
- Your settings and operation logs are preserved (in case you reactivate).
When you delete the plugin through the WordPress admin:
- The cleanup logs database table is dropped.
- All plugin settings are removed from the options table.
- Scheduled events are cleared.
- No product, media, customer, or other WooCommerce data is affected.