by Automattic on WordPress.org

See all of the rewrite rules and flush them or download them.
A simple WordPress admin tool for inspecting rewrite rules. View a listing of all your rewrite rules, see which rewrite rules match a given URL (and the priorities they match in), or filter by different sources of rewrite rules. Perform a soft flush of your rewrite rules to regenerate them.
Developed on GitHub — pull requests are always welcome. Please leave feedback, questions, bug reports, and feature requests in the GitHub issues.
Go to Tools → Rewrite Rules in the WordPress admin.
Quickly test any URL (or path) against your site’s rewrite rules:
Works with full URLs or paths and automatically handles sites installed in a subdirectory.
Browse a table of all permastructs that WordPress is aware of, including:
The “Flush Rules” button allows you to regenerate your site’s rewrite rules. Here’s exactly what happens when you click it:
When you click the “Flush Rules” button, the following sequence occurs:
Security Check: The system verifies you have the proper permissions (manage_options capability) and validates the security nonce to prevent unauthorized access.
Cache Clearing: WordPress deletes the cached rewrite rules from the options cache using wp_cache_delete('rewrite_rules', 'options').
Rule Regeneration: WordPress calls flush_rewrite_rules(false) to regenerate all rewrite rules based on:
Hook Execution: The rri_flush_rules action hook is fired, allowing other plugins to perform additional cleanup or actions after the flush.
Success Feedback: You’re redirected back to the Rewrite Rules Inspector page with a success message confirming the rules have been flushed.
Use the “Flush Rules” button when:
flush_rewrite_rules(false)), which is safer than a hard flush as it doesn’t force regeneration of all rules unnecessarily.manage_options capability can flush rules.