Mass Delete Users by Email
| AI Plugin Information | |
|---|---|
| Version | 3 |
| Download | Download Plugin |
Mass Delete Users by Email
A WordPress plugin that allows administrators to permanently delete multiple user accounts at once by pasting a list of email addresses.
Description
Mass Delete Users by Email is an administrative utility designed for WordPress site administrators who need to remove multiple user accounts efficiently. Common use cases include:
- Cleaning up spam registrations
- Removing test accounts
- Processing bulk account removal requests
- Managing user databases after migrations or imports
Features
Two-Step Workflow
- Preview: Paste email addresses and preview which users will be deleted
- Execute: Review the preview and confirm permanent deletion
Comprehensive Deletion
When a user is deleted, the plugin permanently removes:
- User account and metadata
- Posts, pages, and custom post types
- Comments (including comment metadata)
- Media and attachments
Safety Features
- Preview before deletion: See exactly which users will be deleted
- Self-deletion prevention: Cannot delete your own admin account
- Batch integrity validation: Revalidates users between preview and execution
- CSRF protection: WordPress nonces protect all form submissions
- Capability checks: Restricted to users with
manage_optionscapability
Flexible Input
- Supports comma-separated email addresses
- Supports newline-separated email addresses
- Supports mixed formats
- Handles Windows, Unix, and macOS line endings
- Automatically trims whitespace and removes duplicates
- Validates email format
Detailed Results
After deletion, view comprehensive results showing:
- Successfully deleted users
- Skipped users (with reasons)
- Failed deletions (with error messages)
- Email addresses not found
- Invalid email addresses
Requirements
- WordPress 6.5 or higher
- PHP 7.4 or higher
- Administrator account with
manage_optionscapability
Installation
- Upload the plugin files to
/wp-content/plugins/aiplugin5032/ - Activate the plugin through the ‘Plugins’ menu in WordPress
- Navigate to Tools → Mass Delete to use the plugin
Usage
- Go to Tools → Mass Delete in your WordPress admin
- Paste email addresses in the textarea (one per line or comma-separated)
- Click Preview Users to see which users will be deleted
- Review the preview carefully – check:
- Users found (with their details)
- Email addresses not found
- Invalid email addresses
- Click Permanently Delete X Users to execute the deletion
- Review the results screen showing what was deleted
Important Warnings
⚠️ PERMANENT DELETION: This plugin permanently deletes user accounts and all their content. This action CANNOT BE UNDONE.
⚠️ BACKUP FIRST: Always create a complete backup of your WordPress database before using this plugin.
⚠️ MULTISITE NOT SUPPORTED: This plugin does not support WordPress Multisite installations.
Services
EmailParser: Parses and validates email addresses from textarea input
- Handles multiple formats (comma, newline, mixed)
- Normalizes line endings
- Validates email format
- Removes duplicates
- Separates valid and invalid entries
UserLookup: Looks up WordPress users by email address
- Resolves emails to user IDs
- Retrieves user details (username, display name, roles)
- Revalidates users between preview and execution
UserDeletion: Handles permanent user deletion
- Deletes user accounts via
wp_delete_user() - Explicitly deletes user-authored comments
- Processes batches individually (one failure doesn’t stop the batch)
- Prevents self-deletion
- Validates batch integrity
Security
- Capability checks: All operations require
manage_optionscapability - Nonce verification: CSRF protection on all form submissions
- Batch integrity: Revalidates user/email relationships before deletion
- Self-deletion prevention: Current admin cannot delete their own account
- Input validation: Email format validation and sanitization
Error Handling
The plugin gracefully handles:
- Empty textarea input
- Invalid email addresses
- Duplicate emails
- Users not found
- Users deleted between preview and execution
- WordPress deletion API failures
- Extremely long input
- Mixed formatting and blank lines
Errors for individual users do not abort the entire batch.
Limitations
- No undo: Deletion is permanent
- No logging: Does not create permanent records of deleted users (privacy by design)
- Multisite: Not supported in this version
- Synchronous processing: Processes users sequentially (suitable for administrative batches)
Development
Namespace
All PHP classes use the aiplugin5032 namespace.
WordPress Hooks Used
admin_menu: Registers the Tools submenu pageadmin_enqueue_scripts: Enqueues admin CSSdelete_user/deleted_user: Fired during deletion (viawp_delete_user())
WordPress APIs Used
wp_delete_user(): Core user deletionwp_delete_comment(): Comment deletionget_user_by(): User lookupcurrent_user_can(): Capability checkswp_verify_nonce(): CSRF protection
Support
This is proprietary software. For support, contact the plugin author.
License
Copyright (C) AI_PLUGIN_DEV 2026. ALL RIGHTS RESERVED. THIS IS NOT FREE SOFTWARE.
Changelog
Version 2.0.0
- Initial implementation of Mass Delete Users by Email
- Two-step preview and deletion workflow
- Comprehensive user and content deletion
- Security features (nonce, capability checks, self-deletion prevention)
- Detailed results reporting
- Multisite detection and refusal

