Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/mcglenn07/broken-link-logger/archive/refs/heads/main.zipLogs every 404 hit on your site and lets you redirect it to a working URL in one click, right from the WordPress admin.
Description
Most sites accumulate broken links over time — old blog posts get renamed, products get discontinued, external sites link to pages that no longer exist. Each one is a visitor (or search engine crawler) hitting a dead end. This plugin quietly logs every 404 your site serves and gives you a simple admin screen to do something about it.
Features
- Logs every 404 hit: URL, last referrer, hit count, first/last seen.
- Hits are grouped and counted, not duplicated — the same broken URL hit 50 times is one row with a count of 50, not 50 rows.
- Sortable, searchable admin list table (Tools → Broken Links).
- One-click "Redirect this" — turns a logged 404 into a working 301/302 redirect immediately, no separate redirect-manager plugin needed.
- CSV export for sharing a broken-link report with a content team or SEO consultant.
- Configurable ignore rules: skip logged-in users, skip known bot User-Agents, skip URL patterns (e.g.
/wp-content/uploads/*) by glob pattern. - Automatic cleanup of old, unresolved entries after a configurable retention window (default 90 days, 0 = keep forever).
- No tracking, no external requests, no bloat — two small custom tables, no JS framework, no build step.
- Privacy-conscious: visitor IPs are never stored in plain text, only a salted one-way hash.
Why this instead of a big all-in-one SEO suite?
Many sites already have an SEO plugin and don't want a second one duplicating its redirect manager, or don't want to install a 2MB plugin just to find broken links. This plugin does exactly one job, does it with two small indexed database tables, and gets out of the way.
Installation
- Upload the
broken-link-loggerfolder to/wp-content/plugins/, or install the zip via Plugins → Add New → Upload Plugin. - Activate the plugin through the "Plugins" screen.
- Visit Tools → Broken Links to see logged 404s as they come in.
- Visit Settings → Broken Link Logger to tune ignore rules and retention.
Frequently Asked Questions
Does this slow down my site?
Logging only runs on requests WordPress has already determined are a 404 — normal page loads are untouched except for one early, indexed lookup against the redirects table (to see if a redirect rule should fire instead of showing your 404 page).
Does it store visitor IP addresses?
No. A salted SHA-256 hash of the IP is stored for potential future unique-visitor de-duplication, but the raw IP is never written to the database.
What happens to my data if I deactivate the plugin?
Nothing — deactivating just stops new logging. Your data is only removed if you explicitly delete the plugin from the Plugins screen, which removes both custom tables and all plugin options.
Can I bulk-resolve or bulk-delete entries?
Yes, the admin list table supports bulk "Delete" and "Mark Resolved" actions, plus per-row "Redirect this", "Visit", and "Delete" actions.
Screenshots
- The Tools → Broken Links admin screen, listing logged 404s with hit counts.
- The "Redirect this" quick-action form.
- Plugin settings: ignore rules and retention.
Changelog
1.0.0
- Initial release.
Upgrade Notice
1.0.0
Initial release.