The Inactive User Deletion plugin helps you manage user accounts that have been inactive for a set number of days by automatically deleting them. The plugin allows you to configure the number of days a user must remain inactive before deletion. Additionally, you can send warning emails to users before their account is deleted. These emails are customizable or can be disabled entirely. Before deleting the user, all their posts will be reassigned to a selected user or admin to prevent content loss.
Features
- Automatically deletes users who have been inactive for a specified number of days.
- Sends warning emails to users before deletion (customizable).
- Option to disable warning emails.
- Option to modify the number of inactive days, and the timing for sending warning emails.
- Option to personalize the subject and content of the warning emails.
- Adds a 「Last Login」 column in the Users list in the admin panel.
- Assigns all posts of the inactive user to a selected user or admin before deleting the user.
Configuration
Once the plugin is activated, you can configure the settings by following these steps:
- Go to Dashboard > Inactive User Deletion in the WordPress admin panel.
- Configure the following settings:
-
Delete After Inactive Days:
- Set the number of days of inactivity before the user is deleted.
- Default value: 45 days.
-
Assign Posts Before Deletion:
- Select a user (admin or another user) to whom the posts of the inactive user will be assigned before deletion.
- Default value: Select the 「admin」 or any other user as needed.
-
First Warning:
- Days Before First Warning Email: Set how many days before deletion the first warning email should be sent.
- Default value: 3 days.
- Subject: Customize the subject line for the first warning email.
- Default value: 「Warning: Your account will be deleted in 3 days due to inactivity」.
- Message: Customize the message body for the first warning email.
-
Default value:
`
Dear {user_name},Your account on {site_name} ({site_url}) has been inactive for a while. If you do not log in within the next 3 days, your account will be deleted.
Best regards,
The {site_name} Team
`
-
Final Warning:
- Days Before Final Warning Email: Set how many days before deletion the final warning email should be sent.
- Default value: 1 day.
- Subject: Customize the subject line for the final warning email.
- Default value: 「Final Warning: Your account will be deleted in 1 day due to inactivity」.
- Message: Customize the message body for the final warning email.
-
Default value:
`
Dear {user_name},This is a final reminder that your account on {site_name} ({site_url}) will be deleted in 1 day due to inactivity. Please log in as soon as possible to prevent deletion.
Best regards,
The {site_name} Team
`
-
Disable Warning Emails Before Deletion:
- Check this box if you do not want to send warning emails before user deletion.
- Default value: Unchecked (warning emails enabled).
- Click Save to apply the changes.
Cron Job
This plugin schedules a cron job to check for inactive users and delete them automatically. The task runs daily to check if there are any users who have been inactive for the specified number of days.
- The cron job can be modified or disabled if needed.
Customization
- The email subject and content can be customized by editing the options in the settings page.
- You can also change the number of days for inactivity and the warning periods for the emails.
- Post reassignment can be easily modified by selecting a new user or admin under the settings.
Support
If you encounter any issues or need assistance, please feel free to contact the plugin author via the WordPress profile.






