The Hidden Problem with WordPress Default Bulk Deletion
Every WordPress administrator, developer, and agency eventually faces the daunting task of cleaning up website content:
- Testing a WooCommerce store with 2,000 dummy products and needing to wipe them before launch.
- Redesigning a site and purging hundreds of obsolete blog posts or outdated landing pages.
- Cleaning up failed CSV/XML imports that cluttered your database.
When you attempt to use the built-in WordPress “Bulk Actions → Move to Trash” on thousands of items, two catastrophic problems immediately occur:
- The 504 Gateway Timeout / PHP Memory Crash: WordPress attempts to delete all selected items in a single, synchronous PHP request. On shared hosting or large databases, your server hits
max_execution_time(typically 30–60 seconds) or runs out of RAM, leaving the database half-deleted and corrupted. - The “Orphaned Media” Storage Nightmare: Standard WordPress deletion only deletes the post row itself. It leaves all attached media, uploaded pictures, and featured images sitting inside your
wp-content/uploads/directory forever. Over time, these orphaned files consume tens of gigabytes of disk space and inflate your backup sizes.
Introducing CE Content Delete
CE Content Delete is a lightweight, modern, and developer-friendly WordPress plugin engineered to solve bulk deletion once and for all.
With CE Content Delete, you can choose any registered content type, inspect individual items in a responsive, searchable table, select what you want to delete, and execute a background deletion loop that safely removes both the content AND all attached images and featured images—all without server timeouts.
🚀 Key Features Deep Dive
1. Universal Content Type Auto-Detection
CE Content Delete automatically queries your WordPress installation and detects every registered public and custom content type.
- Standard Posts and Pages
- WooCommerce Products, variations, and orders
- Custom post types from page builders and plugins (Portfolios, Testimonials, Events, Real Estate Listings, Docs, etc.)
- Built-in post count badges show you exactly how many published, draft, pending, private, and trashed items exist for each type.
2. Item-Level Granular Checkbox Control
Unlike “blind wipe” database reset tools, CE Content Delete gives you total visibility:
- See a thumbnail preview, post ID, title, author, publish date, and attached media count for every single item.
- Check off specific items individually, or use the master “Select All on this Page” checkbox.
- Target ALL matching items across all pages with a single click if you want to perform a comprehensive sweep.
3. Automatic Attached Media & Featured Image Purge (Save Disk Space!)
This is the standout feature of CE Content Delete:
- Featured Image Wipe: Automatically locates the post’s featured image (
_thumbnail_id) and deletes it from both the Media Library and your server disk. - Child Attachment Wipe: Automatically queries all media items uploaded directly into the post (
post_parent == post_id) and permanently unlinks their physical files from/wp-content/uploads/. - Zero orphaned media files left behind.
4. Non-Blocking Chunked AJAX Batching Engine
No more white screens of death or server gateway timeouts:
- CE Content Delete breaks your deletion queue into sequential micro-batches (15 items per chunk).
- An animated progress bar and live activity console provide real-time updates as each batch completes (
[10:14:02] Deleted 15 items and 22 attached media files...). - You can pause or cancel the deletion process at any time with a single click.
5. Dual Deletion Modes: Soft Trash vs. Hard Wipe
- Move to Trash (Soft Delete): Safely relocates items to the WordPress Trash. Perfect if you want the ability to inspect and restore content later.
- Permanent Delete (Hard Wipe): Completely cleans the database records immediately, bypassing the trash. Ideal for staging resets and database decluttering.
🛠️ Step-by-Step Usage Guide
Step 1: Install and Activate
- Download
ce-content-delete.zipor install directly from the WordPress Plugin Directory. - In your WordPress admin, navigate to Plugins → Add New → Upload Plugin.
- Activate CE Content Delete.
Step 2: Open the Console
Navigate to Tools → Content Delete in your WordPress admin menu.
Step 3: Choose Your Content Type & Filter
- Select the content type you wish to manage from the dropdown (e.g. Posts, Pages, or Products).
- Use the status filter to narrow down to Published, Drafts, Pending Review, or In Trash.
- Type in the search box to find specific articles by keyword or title.
Step 4: Configure Deletion Rules
- Keep “Delete attached media, images, & featured images” checked (active by default) to clean up image files.
- Select your deletion action: Permanent Delete (Hard Wipe) or Move to Trash (Soft).
Step 5: Select & Execute
- Check the boxes next to the items you want to delete, or click “Mass Delete ALL Matching Items”.
- Review the confirmation popup summarizing how many items and media attachments will be removed.
- Click “Yes, Delete Now” and watch the live progress bar finish the job smoothly.
🔒 Security & WordPress Coding Standards
CE Content Delete was built strictly adhering to the official WordPress.org Plugin Guidelines and passes all Plugin Check (PCP) verification suites:
- Strict Capability Checks: Only administrators with both
manage_optionsanddelete_postspermissions can access or execute deletion endpoints. - Nonce Protection: Every AJAX request is protected by a unique cryptographic WordPress nonce (
check_ajax_referer). - Deep Input Sanitization: All incoming requests are unslashed with
wp_unslash()and sanitized usingsanitize_key(),sanitize_text_field(), andabsint(). - Output Escaping: 100% of HTML attributes, URLs, and text nodes are safely escaped using
esc_html(),esc_attr(), andesc_url(). - Zero External Dependencies: No external tracking, no bloated JavaScript frameworks, and zero remote CDN calls. Everything runs locally inside your WordPress environment.
❓ Frequently Asked Questions (FAQ)
Does this delete images from wp-content/uploads/?
Yes. When the media cleanup option is active, both the post’s featured image (_thumbnail_id) and any media attachments uploaded directly to that post (post_parent == post_id) are permanently unlinked and deleted from your server’s upload folder via WordPress’s native wp_delete_attachment() API.
What happens if an image is shared across multiple posts?
WordPress attaches images directly to the parent post where they were first uploaded. If an image was uploaded through the general Media Library without a post parent and manually inserted elsewhere, it is not considered a child attachment and will remain untouched unless it is assigned as the featured image of the post being deleted.
Can I restore deleted content?
If you select “Move to Trash (Soft)”, your items are moved to WordPress Trash, where you can restore them at any time. If you select “Permanent Delete (Hard Wipe)”, records and files are permanently purged. As best practice, always keep an up-to-date backup before performing bulk operations.
Does CE Content Delete work with Custom Post Types and Custom Fields (ACF)?
Yes. CE Content Delete dynamically detects all registered Custom Post Types. When a post is deleted, WordPress’s core deletion routine automatically purges associated postmeta records, including ACF custom fields.
📥 Download & Support
- Official Plugin Page: https://crushedge.com/ce-content-delete
- WordPress Plugin Directory: wordpress.org/plugins/ce-content-delete
- Developed by: SepedaTua (Crushedge)
- Support & Feature Requests: Visit crushedge.com or submit a ticket via the WordPress.org support forum.
No Comments