Table of Contents
- Back up the records you need
- Choose how to clear WordPress login records
- Stop saving IPs or clear saved user IPs
- Check the history, Users screen, and reports
- Frequently asked questions
You can clear WordPress login records from the free When Last Login plugin. You can remove older entries or clear the entire event history. Before you choose, decide what you still need for reports or support.
The plugin also stores each user’s latest login separately. So the Last Login column can still show a date after you clear the history. This guide covers the tools in version 1.2.4.
Back up the records you need
Start with administrator access to WordPress and a fresh site and database backup. Before testing a cleanup on your live site, try it on staging.
If you need a readable copy, follow our guide to export WordPress login records. Choose the login history export for individual sign-ins. Then open the CSV or JSON to check that it covers the dates you need.
Keep the export somewhere private because it can contain names, email addresses, and IP data. For recovery, keep the database backup. The WordPress Tools → Export screen creates an XML content export.
Choose how to clear WordPress login records
To clear WordPress login records, open When Last Login → Settings in your dashboard. Then scroll to Tools. Each cleanup row has its own Run Now button.
- Clear old logs. Use this if you want to keep recent entries. The default cutoff is three months back.
- Clear all logs. Use this if you intend to remove the full event history. It also removes IP values attached to those entries.
- Clear all IP Addresses. This removes the IP values stored on user accounts. The event history and its own saved IP values remain.
Before you confirm, read the prompt and check that it describes the row you chose. If it names the wrong action, cancel. When you confirm, the plugin deletes the selected data immediately.
Clear old logs runs once each time you confirm it. If you want a regular cleanup, set a reminder to review the history again.
Stop saving IPs or clear saved user IPs
Open When Last Login → Settings and find Record user’s IP address under Options. To stop future IP collection, untick the box. Then select Save Settings.
If you also want to clear IPs stored on user accounts, use Clear all IP Addresses → Run Now. Confirm the prompt. Existing login entries can still hold their own saved IP values.
If you need to keep those entries while removing only their IP values, ask your site developer for help. The built-in IP tool clears the user-account values. Our earlier note about When Last Login and stored IPs also explains the two storage locations.
Check the history, Users screen, and reports
- Login history. If Enable “All Login Records” is on, reopen the plugin’s All Login Records screen. Check that the expected history is gone.
- Latest login. Then open Users → All Users. A user’s Last Login value can still appear because the plugin stores it separately.
- Reports. If you use When Last Login User Statistics, review a date range affected by the cleanup. Report totals can change when the underlying login entries disappear.
If you expect tracking to continue, sign in with a test account in a private window. Then confirm a new entry appears. If it doesn’t, follow the When Last Login troubleshooting guide.
Frequently asked questions
Does clearing login history delete WordPress accounts?
WordPress accounts stay in place. The history tools delete login entries and their attached data. Your latest-login values and user-level login counts also stay in place.
Can I keep the latest login and stop collecting a history?
Yes. Untick Enable “All Login Records” and save. The plugin still updates the user’s latest-login value. If you need User Statistics, keep the history setting on because the add-on uses those records.
Can I undo a cleanup from the plugin?
The plugin’s cleanup tools delete the selected data directly. If you need it back, ask your host or developer about restoring the backup. Check that the restore plan accounts for newer activity on the site.
If you’re unsure which data your site still needs, start by reviewing an export. Then choose the smallest cleanup that meets your goal. See the free When Last Login plugin.