Docs

Log retention and data removal

6 min readUpdated November 19, 2026

Nahnu Login Shield keeps an event log of logins, lockouts and blocks on your own site. This topic shows how to control how long it keeps that log, how to export or clear it, and how to remove the other data the plugin stores.

What is stored is described in What data Nahnu Login Shield stores. Removing the plugin completely is covered in Uninstalling and removing your data.

How the log is trimmed#

Once a day, the plugin removes old log entries. Two limits apply, and both are enforced:

SettingDefaultAllowed rangeWhat it does
Retention period30 days1 to 365 daysEntries older than this are deleted
Max row cap50,000 rows1,000 to 500,000 rowsIf the table is bigger than this, the oldest rows are deleted in batches until it fits

Whichever limit is reached first removes the entry. A busy site under attack can hit the row cap long before 30 days pass.

The daily clean-up runs through WP-Cron, WordPress’s built-in scheduler. WP-Cron runs when someone visits your site, so on a site with very little traffic the clean-up may run late. Sites that turn WP-Cron off and use a real server cron need that cron job to call WordPress’s cron, or the log won’t be trimmed.

The same daily job also deletes accounts that never confirmed their email address, if you use Signup email verification. See that topic.

Change how long the log is kept#

  1. Go to Settings → Login Shield → Log.
  2. Scroll down to Log settings.
  3. Set Retention period (days) and Max row cap (rows).
  4. Click Save log settings.

The same two fields are also in the Settings tab, under Log retention and Max log rows, with the button Save settings. They change the same values.

The change takes effect at the next daily clean-up. Entries older than your new period are removed then, not at the moment you save.

A settings menu titled “Log settings” shows two configuration options. “Retention period” is set to 30 days, and “Max row cap” is set to 50,000 rows, each with additional descriptive text for usage limits.

Choosing a number. Keep the log only as long as you need it. A short period (7 to 30 days) is enough to investigate recent attacks and to power the Analytics tab. A longer period gives more history but stores more IP addresses and usernames. If your database is growing, lower the period or the row cap.

Check the current size. The Log tab shows “Log usage” (rows used out of your cap, and the percentage) and the retention in days.

Export the log#

  1. Go to Settings → Login Shield → Log.
  2. Click Export CSV below the log table.

The file contains the log. Treat it like any file with IP addresses and usernames: store it safely and delete it when you’re done.

Clear the whole log#

  1. Go to Settings → Login Shield → Log.
  2. Click Clear log.
  3. Confirm “Clear all log entries? This cannot be undone.”

This empties the log table at once. It cannot be undone, so export first if you want a copy. Clearing the log does not remove lockouts, the blocklist or any settings.

Remove one person’s entries#

The plugin has no button to delete the log entries for a single IP address or username. Your options are:

  • Wait for the retention period to remove them.
  • Clear the whole log (above).
  • Delete the rows in the database yourself. Back up your database first. In a database tool such as phpMyAdmin, run a statement like the one below. Replace wp_ with your table prefix and the example address with the real one.
DELETE FROM wp_nahnls_log WHERE ip = '203.0.113.25';
DELETE FROM wp_nahnls_log WHERE username = 'example-user';

Ask your host or developer if you are not comfortable doing this.

WordPress’s built-in privacy tools. WordPress has Export Personal Data and Erase Personal Data tools under Tools. Nahnu Login Shield does not add its entries to them, so those tools won’t include or remove its log rows. If you receive a data request, handle the log and the user data described below yourself.

Remove the data stored on a user account#

Some features store data against a user’s account (two-factor settings, passkeys, magic-link choices, signup verification). To remove it:

  • Two-factor authentication. An administrator can reset a user’s 2FA. The user then falls back to email codes. See How 2FA works.
  • Passkeys. The user can remove them on their Login & security page, and an administrator can do it on the user’s profile. See Passkeys.
  • Everything at once for a user. Deleting the user account from Users removes the account’s own data. Plugin data stored against that account is removed with it. Check What data Nahnu Login Shield stores for what lives there.
  • All users at once. Delete the plugin (below).

Remove lockouts, blocks and settings#

WhatHow
A lockout on an IP or usernameLockout tab → unlock. See Unlock an IP.
The IP blocklistLockout tab → edit the blocklist and save
Settings back to a clean slateDelete the plugin and install it again, or change each setting. Back up first with Settings → Backup & restore → Export settings.
Edge blocks at Bunny.net or CloudflareSee the note below

Settings backup. The export file leaves out your CAPTCHA secret key and the geo lookup API key. It does include your Bunny.net API key and Cloudflare API token if you saved them in the settings, plus your blocklist, whitelist and role rules. Store it like a password file.

Deleting the plugin removes its data#

When you delete the plugin from the Plugins screen (not just deactivate it), the plugin’s clean-up runs and removes:

  • The plugin’s settings and lockout records
  • The signing secret and the edge block records
  • The event log table
  • The plugin data stored on every user account
  • Its temporary entries
  • The early-block file and its counter folder, if you had installed it

Deactivating the plugin alone keeps your data in place, but it stops the daily log clean-up while the plugin is off.

Remove edge rules yourself. Rules that the plugin already created at Bunny.net or Cloudflare are not removed when you deactivate or delete the plugin. Deactivating also stops the scheduled task that would have removed Cloudflare rules when their time was up. In Bunny.net, check the pull zone’s blocked IPs and, under Shield, the access lists “Nahnu Login Shield lockouts” and “Nahnu Login Shield blocked networks” and the rate limit rule “NahnuLoginShieldRateLimit”. In Cloudflare, check IP Access Rules (blocked IPs and networks) and the login rate limiting rule. Delete any you no longer want. See Block at the edge with Bunny.net and Block at the edge with Cloudflare.

Before you delete: export what you want to keep (the log as CSV, the settings as JSON). Deleting cannot be undone.

What isn’t removed#

  • Copies of your data in database backups and host backups. Remove or rotate them according to your own backup policy.
  • Files you exported (CSV and JSON).
  • Copies held by outside services you used. For example, your CAPTCHA provider and any country lookup service keep their own records. See External services Nahnu Login Shield can contact.
  • Emails the plugin already sent.

Was this helpful?

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only