WP Manifestindependent plugin directory
manifest / users / wp-naur

WP NAUR

WordPress Non-Active Users Removal (NAUR)

by Ari Kontiainen · github.com/kontiainen/wp-naur · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/kontiainen/wp-naur/archive/refs/heads/main.zip

WP NAUR — WP Non-Active User Removal

WordPress plugin that helps identify and manage inactive user accounts with notifications, archiving, and safe deletion.

Features

  • Activity tracking — Monitors logins, page views, post edits, comments, and profile updates to determine real user activity
  • Configurable inactivity threshold — Define how many days of inactivity qualifies a user for cleanup
  • Two-stage email notifications — First warning and final warning with customizable templates and placeholders
  • Exclusion system — Exclude by role, specific user IDs, or per-user override. Auto-proposes excluding administrators, editors, and high-value contributors
  • Content reassignment — Posts, comments, media, and Simple:Press forum content are transferred to an admin-defined user before deletion
  • User archiving — Full user data exported to JSON/ZIP before deletion, with selective restore capability
  • Dry-run mode — Preview what will happen before any deletion
  • Batched deletion — Processes users in configurable batches to prevent timeouts
  • Bounce handling — Detects failed email delivery and optionally fast-tracks undeliverable accounts
  • Audit log — Every action (warnings, deletions, restores, settings changes) is logged with timestamps
  • Dashboard widget — At-a-glance summary of inactive users, pending deletions, and archives
  • WP-CLI support — Full command-line interface for all operations
  • GDPR-friendly — Archives serve as data export, audit log provides proof of notice

Requirements

  • WordPress 5.8+
  • PHP 7.4+

Installation

  1. Copy or symlink the wp-naur directory into wp-content/plugins/
  2. Activate the plugin in WordPress admin → Plugins
  3. Go to User Cleanup → Settings to configure

Configuration

Inactivity Thresholds

Setting Default Description
Days of inactivity 180 Users inactive this long are flagged
First warning period 30 days Time between first and final warning
Final warning period 7 days Time after final warning before deletion eligibility

Exclusions

  • Roles — Administrator and Editor excluded by default
  • User IDs — Comma-separated list of always-excluded users
  • Reassignment target — Automatically excluded
  • Per-user override — "Exclude" button on the inactive users list
  • High-value threshold — Users with many published posts are flagged with a warning

Email Templates

Available placeholders: {site_name}, {site_url}, {login_url}, {user_name}, {user_login}, {user_email}, {days}

Leave the body empty to use the built-in default templates.

Workflow

  1. Plugin tracks user activity automatically after activation
  2. Daily cron scan identifies users inactive beyond the threshold
  3. First warning email is sent to flagged users
  4. After the first warning period, if still inactive, final warning is sent with a deletion deadline
  5. Users past the deadline appear in User Cleanup → Inactive Users → Ready for Deletion
  6. Admin reviews the list, optionally runs a dry run, then deletes
  7. Before deletion: user data is archived, content is reassigned
  8. Archives are available for selective restore during the retention period

WP-CLI Commands

wp user-cleanup scan              # Run the inactive user scan
wp user-cleanup list              # List inactive users (--days=90 --format=csv)
wp user-cleanup notify <id>       # Send warning (--stage=first|final)
wp user-cleanup delete <ids>      # Delete users (--dry-run, --yes)
wp user-cleanup delete ready      # Delete all users past deadline
wp user-cleanup archive-list      # List all archives
wp user-cleanup restore <id>      # Restore user from archive
wp user-cleanup stats             # Show cleanup statistics

Simple:Press Integration

The plugin automatically detects Simple:Press forum tables and handles:

  • Reassigning forum posts and topics to the target user
  • Including forum content in user archives
  • Restoring forum content ownership on user restore

Uninstall

Deleting the plugin via WordPress admin removes all data: database tables, options, user meta, cron events, and archive files.

Author

Ari Kontiainen

License

GPL-2.0-or-later