=== Permapilot – Automatic Permalink Refresh ===
Contributors: guyargaman
Tags: permalinks, rewrite rules, flush, custom post types, 404
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Never re-save Settings → Permalinks again. Fixes 404s on new post types, taxonomies and custom routes automatically.

== Description ==

When a theme or plugin adds or changes a custom post type, a taxonomy, a rewrite rule or an endpoint, WordPress keeps serving its old, cached rewrite rules. The new URLs return 404 until someone goes to Settings → Permalinks and clicks Save.

Permapilot does that for you. On every request it compares a lightweight fingerprint of the registered routes with the one the rules were built from. When they differ, it rebuilds the rules once. When nothing changed, it costs one option read and one hash.

It catches:

* New custom post types and taxonomies.
* Changed post type or taxonomy slugs.
* Rules added with `add_rewrite_rule()`.
* Endpoints added with `add_rewrite_endpoint()`.

There are no settings. Activate it and forget it.

= Permapilot Pro =

Renamed a post type or taxonomy slug? Every old URL now leads nowhere. [Permapilot Pro](https://checkout.freemius.com/plugin/41571/plan/72192/) sends visitors and search engines from the old URLs to the new ones with permanent (301) redirects, including taxonomy term URLs, which WordPress never redirects on its own.

== Frequently Asked Questions ==

= Does it slow my site down? =

No. The check runs once per request and reads one cached option. Rules are only rebuilt when the routes actually change.

= Does it rewrite my .htaccess file? =

No. It does a soft flush, which rebuilds the rules stored in the database and leaves .htaccess alone.

= What if another plugin registers routes only on some pages? =

Some plugins register their routes only in wp-admin, so the routes keep changing between requests. Permapilot rebuilds the rules at most 5 times in 10 minutes, so this never turns into a rebuild on every request.

= Does it catch rules added with the rewrite_rules_array filter? =

Not yet. Changes made only inside a filter callback are not part of the fingerprint. Save Settings → Permalinks once after changing such code.

== Changelog ==

= 1.1.0 =
* Added a "Go Pro" link to the plugin's row on the Plugins screen, hidden when Permapilot Pro is active.

= 1.0.0 =
* First release.
