WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Automattic v1.6.0

Rewrite Rules Inspector

A simple admin tool for inspecting rewrite rules.

Rewrite Rules Inspector

The facts

Rating
5★ from 26
Active installs
10k+
Price
Free
Last updated
6 Jan 2026
Added
May 2012
Requires WP
6.4
Tested up to
WP 6.9.7
Requires PHP
7.4
Downloads
482,924

Our analysis

AI-assisted

Rewrite Rules Inspector is a WordPress plugin that allows you to inspect and manage rewrite rules within your site. You can view a list of all rewrite rules, check which rules match a specific URL, and perform a soft flush to regenerate these rules. This tool is designed for users who need to understand and manage URL handling on their WordPress sites.

The plugin provides features such as a URL tester to check the matching rules for any given URL, a table of permastructs that WordPress recognises, and a flush rules function that regenerates rewrite rules based on your current settings. It is suitable for developers and site administrators who require detailed insights into their site's URL structure and rewrite rules.

Best for: This plugin suits WordPress developers and administrators managing complex URL structures.

What it does well

  • Free to use from the WordPress.org directory
  • Developed by Automattic
  • Allows detailed inspection of rewrite rules
  • Includes a URL testing feature
  • Provides a flush rules function to regenerate rules

Where it falls short

  • Limited information on additional features or user support
  • No advanced configuration options mentioned

Verdict

Rewrite Rules Inspector is a straightforward tool for inspecting and managing rewrite rules in WordPress. It is particularly beneficial for users needing to troubleshoot or optimise their site's URL handling.

From the developer

Automattic's own description of Rewrite Rules Inspector, lightly tidied.

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.

Where to find it

Go to Tools → Rewrite Rules in the WordPress admin.

URL Tester

Quickly test any URL (or path) against your site’s rewrite rules:

  • See whether the URL would be a 404 or which rule would match first (the one WordPress uses).
  • View the list of all matching rules, in match priority order.
  • Inspect the query variables extracted from the match and the resulting final query WordPress would run.

Works with full URLs or paths and automatically handles sites installed in a subdirectory.

Permastructs

Browse a table of all permastructs that WordPress is aware of, including:

  • Name — the permastruct key (e.g. for posts, taxonomies, authors).
  • Structure — the permalink structure pattern used to generate rules.
  • Description — a human-friendly summary of what the permastruct controls.

Flush Rules

The “Flush Rules” button allows you to regenerate your site’s rewrite rules. Here’s exactly what happens when you click it:

What the Flush Rules Button Does

When you click the “Flush Rules” button, the following sequence occurs:

  1. Security Check: The system verifies you have the proper permissions (manage_options capability) and validates the security nonce to prevent unauthorized access.

  2. Cache Clearing: WordPress deletes the cached rewrite rules from the options cache using wp_cache_delete('rewrite_rules', 'options').

  3. Rule Regeneration: WordPress calls flush_rewrite_rules(false) to regenerate all rewrite rules based on:

    • Current permalink structure settings
    • Custom post types and taxonomies
    • Any custom rewrite rules added by themes or plugins
  4. Hook Execution: The rri_flush_rules action hook is fired, allowing other plugins to perform additional cleanup or actions after the flush.

  5. Success Feedback: You’re redirected back to the Rewrite Rules Inspector page with a success message confirming the rules have been flushed.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for custom content structures.

Ad Inserter

Manage Google AdSense ads, banners, ad rotation, sticky widgets, AMP ads, ads.txt, tracking, header and footer...

Free 300k+ installs 4.9★ (2,428)
Advanced Custom Fields

ACF helps customize WordPress with powerful, professional and intuitive fields. Proudly powering over 2 millio...

Free 2M+ installs 4.5★ (1,438)
Simple Custom Post Order

Easily reorder posts, pages, custom post types, and taxonomies with intuitive drag-and-drop sorting in the Wor...

Free 300k+ installs 4.8★ (569)
WP Activity Log

The #1 user-rated activity log plugin for event logging, activity monitoring and change tracking.

Free 300k+ installs 4.7★ (488)
Custom Post Type UI

Admin UI for creating custom content types like post types and taxonomies

Free 1M+ installs 4.6★ (276)