Rewrite Rules Inspector

Plugin Banner

Rewrite Rules Inspector

by Automattic

Download
Description

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.

Install the plugin from within WordPress

  1. Visit the Plugins page from your WordPress dashboard and click “Add New” at the top of the page.
  2. Search for “rewrite-rules-inspector” using the search bar on the right side.
  3. Click “Install Now” to install the plugin.
  4. After it’s installed, click “Activate” to activate the plugin on your site.

Install the plugin manually

  1. Download the plugin from WordPress.org or get the latest release from our GitHub Releases page.
  2. Unzip the downloaded archive.
  3. Upload the entire rewrite-rules-inspector folder to your /wp-content/plugins directory.
  4. Visit the Plugins page from your WordPress dashboard and look for the newly installed plugin.
  5. Click “Activate” to activate the plugin on your site.
  1. <p>See all of the rewrite rules and flush them or download them.<br />
</p>

    See all of the rewrite rules and flush them or download them.

  2. <p>Test a URL against the rules to see which one(s) would match, and the priority they would match in.<br />
</p>

    Test a URL against the rules to see which one(s) would match, and the priority they would match in.

  3. <p>Limit rules and URL testing results down to specificrule sources.<br />
</p>

    Limit rules and URL testing results down to specificrule sources.

  4. <p>See which permastructs WordPress knows about.<br />
</p>

    See which permastructs WordPress knows about.

Genius tool for debugging redirect errors

By Roice (roicecz) on May 28, 2025

Sometimes you get into a trap that logically leads nowhere and this plugin can help you find a way out of this vicious circle. Thanks.

Time Saver

By lflier on November 7, 2021

Whenever you change a custom post type, you must flush the rewrite rules. This plugin does in in a single click. Additionally it enables you to check your rewrite rules against your URLs to make sure everything is working as it should. This is one of my essential plugins.

Thank you!!

By shamank on March 16, 2021

Thank you man, you saved me a lot of time!!

Does the job with rewrite rules!

By johnnyhuy on November 27, 2018

Simple and straight forward to solve issues with rewrite rules.

Great tool!

By Steven (stgoos) on March 25, 2018

Love the plugin but noticed today, whilst debugging a new plugin I'm writting, that the plugin still uses the depreciated functions: screen_icon() and get_screen_icon(). Both have gone depreciated since 3.8.0 so I reckon a minor update to avoid these errors from popping up in the debug mode is worth the effort 🙂 The fix - with backwards compatibility (do we need that?) - would be to change: <?php screen_icon( 'tools' ); ?> into: <?php if ( function_exists('screen_icon') ) screen_icon( 'tools' ); ?> ___ (!) Notice: screen_icon is deprecated since version 3.8.0 with no alternative available. (!) Notice: get_screen_icon is deprecated since version 3.8.0 with no alternative available. Location ..\rewrite-rules-inspector.php:208

The best plugin for this tasks!

By andreykashops on November 7, 2017

I'm using this plugin for developing rewrite rules. It's the best plugin for developing!

This is essential!

By folbert on September 16, 2017

Added to my short list of essential plugins for dev- and staging-environments.

Does what it says on the box

By Jason (galapogos01) on July 22, 2017

Works great. Helped me resolve an issue with WC3.0 rewrite rules changing priority.

Nice one!

By Bernhard Gronau (quasel) on June 20, 2017

Easy Testing what wordpress rewrite thinks about any url 😉

A must have for permalinks work

By unapersona on February 23, 2017

Best option when working with permalinks and custom urls structs

See the change log.

Back to top