Plugin
301, 302 SEO Redirects & 404 Monitor
301 and 302 redirects, plus a log of the missing URLs visitors actually hit. One click turns a 404 into a redirect. Zero bloat.
/**
Plugin header
- Plugin name:
- 301, 302 SEO Redirects & 404 Monitor – EPAS
- Version:
- 1.0.0
- Requires at least:
- 6.4
- Requires PHP:
- 7.4
- Languages:
- English, Lietuvių
- License:
- GPL-2.0-or-later
- Download size:
- 53 KB
*/
What it does
- A 404 log that stays small. One row per URL with a hit counter, not one row per hit — a crawler walking a thousand bad URLs cannot flood it, and the least recently seen URLs drop off past the limit you set (500 by default).
- Redirect straight from the log. Every logged URL has a Redirect this link that opens the rule already filled in, so a broken link becomes a redirect in two clicks.
- Three ways to match: an exact path, a wildcard for a whole section (
/old-blog/*→/blog/*carries the rest of the path over), or a regular expression with$1,$2captures for an awkward migration. - Rename a published post and the old URL keeps working — as a real rule in the list that you can edit or delete, which keeps working after further renames.
- A hit counter and "last used" date on every rule, so you can see which redirects are earning their keep.
- You cannot lock yourself out. wp-admin, the login screen, the REST API and the home page are never redirected — the editor refuses those rules, and the request-time check refuses them again.
define( 'EPAS_REDIRECTS_DISABLE', true );inwp-config.phpstops every redirect while the rules stay saved. - A site with no rules makes no extra database queries at all: the rule counts live in an autoloaded option, so a path is only looked up when there is something to look up.
Questions
Will the 404 log fill up my database?
No. Repeat hits on the same URL only increment a counter, so the table grows with the number of different missing URLs, not with traffic — and it is capped (500 by default, adjustable from 20 to 5000). Past the cap the least recently seen URLs are dropped. A skip list keeps favicons, /wp-content/* and security scanners out entirely.
Does it record visitors' IP addresses?
No. Each row holds the URL, a hit counter, the first and last time it was seen, and the referring page. Nothing that identifies a person, so the log adds nothing to your GDPR paperwork.
Does a redirect work if a page still exists at that URL?
Yes, and that is deliberate — retiring a page that still exists is a normal thing to want. Rules are checked before WordPress looks for content, so a rule always wins. Delete or disable it if that was not your intention.
What if another redirect plugin is already active?
This one stops redirecting entirely and says so in one dismissible notice, because two plugins redirecting the same paths is how sites end up in loops nobody can debug. The 404 log keeps working, since that stays useful. Deactivate one of the two and ours takes over immediately.
Can I redirect to another domain?
Yes — a target can be a full https:// address, which is what you need when content has moved to a different site. Local targets are written as plain paths.
How to get it
This plugin is finished and being prepared for the WordPress.org plugin directory. Until it is published there, email us and we will send you the current zip.