WordPress Plugins
Free Tools
Claude Skills
Resources
Pricing Support My Account Cart
Support / Royal AI Firewall / Log retention

How long Royal AI Firewall keeps its logs

Royal AI Firewall keeps 7 days of AI bot activity. Once a day it removes anything older, so the database stays small without any work from you. This page covers what is stored, what the daily cleanup removes, how to keep logs for longer, the Erase all logs now button, and what happens to your data when you uninstall.

Where to find these settings

Everything on this page lives under AI Firewall → Settings → Data in your WordPress admin.

What the firewall stores

The firewall writes to four kinds of records:

RecordWhat it holdsKept for
Request logOne row per AI bot request: time, bot, verification result, IP address, user agent, method, URL, page type, response status and size, the policy decision and its reason, the Content Signals verdict and the Web Bot Auth result. Royal MCP tool calls and Abilities API calls are stored here too.Your retention window (7 days by default)
Daily summariesHits per bot per day, rebuilt every hour from the request log.Your retention window
Page-type summariesHits per bot per page type per day, used by the page-type tile and heatmap.Your retention window
Bot access baselineDaily counts of verified search engine visits (Googlebot, Bingbot, Applebot, DuckDuckBot), used by the Bot Access page to spot a sudden drop.30 days, separately

Your per-bot policies, settings and the bot catalog are not logs. They are never removed by the cleanup.

What the daily cleanup removes

A WP-Cron task runs once a day and deletes rows older than the retention window from the request log, the daily summaries and the page-type summaries. Each run works for up to 20 seconds, so a very large backlog is cleared over several days. All three use the same window: summaries are not kept longer than the rows they were built from.

On busy sites the cleanup deletes in batches, so it never locks the log table for long.

The log has a per-minute cap

To keep a flood from one bot from filling your database, the firewall writes at most 300 log rows per bot per minute. Requests over the cap are still blocked, rate limited or paywalled as usual; they just are not written to the log. Developers can change the cap with the raif_log_rows_per_minute filter.

Keep logs for longer (or shorter)

The Settings page shows the window in use (7 days unless you change it). To use a different window, add the raif_log_retention_days filter in a small must-use plugin or a code snippets plugin:

<?php
// wp-content/mu-plugins/raif-log-retention.php
add_filter( 'raif_log_retention_days', function () {
    return 30; // days
} );

Developers who want to act after each cleanup can hook raif_log_pruned. It receives the number of request-log rows removed and the cutoff time.

Erase all logs now

To start over with an empty log, go to Settings → Data → Erase invocation log and click Erase all logs now. Confirm the prompt and the firewall empties:

It keeps:

This cannot be undone

Erased rows are gone for good. Your policies and settings are not affected.

Your data when you deactivate or uninstall

Deactivating

Deactivating stops the firewall's scheduled tasks and takes its entries back out of supported page caches' user-agent lists. Logs, policies and settings stay, so reactivating picks up where you left off.

Uninstalling (default: keep everything)

By default, deleting the plugin keeps all of its data. A reinstall finds your logs, policies and settings as you left them.

Uninstalling and deleting everything

Turn on the delete option

In Settings → Data → Uninstall behavior, tick Delete all logs, tables, and options when the plugin is uninstalled and click Save changes.

Deactivate and delete

In Plugins, deactivate Royal AI Firewall, then click Delete.

With the option on, uninstall removes the plugin's five database tables, its options and cached values, and its scheduled tasks. One setting shared with SEObolt Pro (the self-check signing key) is kept while SEObolt Pro is installed. On a multisite network each site that turned the option on is cleaned; sites that did not keep their data. Settings that belong to other plugins (for example Elementor's Agent Ready settings) stay with those plugins.

Still stuck? Two support paths

Community support (free): wp.org plugin forum

Post a new thread at wordpress.org/support/plugin/royal-ai-firewall/. The Royal Plugins team monitors the forum regularly.

Premium support (paid)

For direct one-on-one help with a 24-hour SLA, see Premium Support ($149/year).

Information to include (either path)

  • Your Royal AI Firewall version (from Plugins)
  • Whether you set raif_log_retention_days, and to what value
  • Whether WP-Cron runs on your site (some hosts disable it and run a server cron instead)
  • Roughly how many rows your request log holds, if you know