Title: Rewrite Rules Inspector
Author: Automattic
Published: <strong>2012年5月9日</strong>
Last modified: 2026年1月6日

---

プラグインを検索

![](https://ps.w.org/rewrite-rules-inspector/assets/banner-772x250.png?rev=3377946)

![](https://s.w.org/plugins/geopattern-icon/rewrite-rules-inspector_f2f3f3.svg)

# Rewrite Rules Inspector

 作者: [Automattic](https://profiles.wordpress.org/automattic/)

[ダウンロード](https://downloads.wordpress.org/plugin/rewrite-rules-inspector.1.6.0.zip)

 * [詳細](https://ja.wordpress.org/plugins/rewrite-rules-inspector/#description)
 * [レビュー](https://ja.wordpress.org/plugins/rewrite-rules-inspector/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/rewrite-rules-inspector/#installation)
 * [開発](https://ja.wordpress.org/plugins/rewrite-rules-inspector/#developers)

 [サポート](https://wordpress.org/support/plugin/rewrite-rules-inspector/)

## 説明

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](https://github.com/Automattic/Rewrite-Rules-Inspector/) — 
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:
 4.  * Current permalink structure settings
     * Custom post types and taxonomies
     * Any custom rewrite rules added by themes or plugins
 5. **Hook Execution**: The `rri_flush_rules` action hook is fired, allowing other 
    plugins to perform additional cleanup or actions after the flush.
 6. **Success Feedback**: You’re redirected back to the Rewrite Rules Inspector page
    with a success message confirming the rules have been flushed.

#### When to Use Flush Rules

Use the “Flush Rules” button when:

 * **Missing Rules**: You see rules marked as “missing” (red background) in the 
   inspector
 * **Custom URLs Not Working**: Your custom permalinks or post type URLs aren’t 
   working properly
 * **After Plugin Changes**: You’ve activated/deactivated plugins that register 
   custom rewrite rules
 * **Permalink Structure Changes**: You’ve modified your site’s permalink structure
 * **Custom Post Type Issues**: New custom post types or taxonomies aren’t generating
   proper URLs

#### Important Notes

 * **Soft Flush**: This performs a “soft” flush (using `flush_rewrite_rules(false)`),
   which is safer than a hard flush as it doesn’t force regeneration of all rules
   unnecessarily.
 * **Permissions Required**: Only users with `manage_options` capability can flush
   rules.
 * **No Data Loss**: Flushing rules doesn’t delete any content or settings, it only
   regenerates the URL routing rules.
 * **Immediate Effect**: Changes take effect immediately after flushing.

## スクリーンショット

 * [[
 * See all of the rewrite rules and flush them or download them.
 * [[
 * Test a URL against the rules to see which one(s) would match, and the priority
   they would match in.
 * [[
 * Limit rules and URL testing results down to specificrule sources.
 * [[
 * See which permastructs WordPress knows about.

## インストール

### WordPress 内からプラグインをインストールする

 1. WordPress ダッシュボードの「プラグイン」ページにアクセスし、ページ上部の「新規追加」
    をクリックします。
 2. 右側の検索バーを使用して「rewrite-rules-inspector」を検索します。
 3. 「今すぐインストール」をクリックしてプラグインをインストールします。
 4. インストール後、「有効化」をクリックしてプラグインを有効にします。

### 手動でプラグインをインストールする

 1. Download the plugin from WordPress.org or get the latest release from our [GitHub Releases page](https://github.com/automattic/Rewrite-Rules-Inspector/releases).
 2. ダウンロードしたファイルを解凍します。
 3. `rewrite-rules-inspector` ディレクトリを `/wp-content/plugins` にアップロードし
    ます。
 4. WordPress ダッシュボードの「プラグイン」ページにアクセスし、新しくインストールした
    プラグインを探します。
 5. 「アクティベート」をクリックしてサイトのプラグインを有効にします。

## 評価

![](https://secure.gravatar.com/avatar/df56c74587f1e09dc14e7664ec61ba803bba512733f9f5f7e8ee6017867b09bf?
s=60&d=retro&r=g)

### 󠀁[Genius tool for debugging redirect errors](https://wordpress.org/support/topic/genius-tool-for-debugging-redirect-errors/)󠁿

 [Roice](https://profiles.wordpress.org/roicecz/) 2025年5月28日

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.

![](https://secure.gravatar.com/avatar/538386321d90944749402304a6980b616e43a75240c63dcfd07a8b4c16548a7a?
s=60&d=retro&r=g)

### 󠀁[Time Saver](https://wordpress.org/support/topic/time-saver-308/)󠁿

 [lflier](https://profiles.wordpress.org/lflier/) 2021年11月7日

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.

![](https://secure.gravatar.com/avatar/b8cd1fa291982a482d60e9985bc5659ab7ea570a4aa55427f1f0cd92899e58ff?
s=60&d=retro&r=g)

### 󠀁[Thank you!!](https://wordpress.org/support/topic/thank-you-2756/)󠁿

 [shamank](https://profiles.wordpress.org/shamank/) 2021年3月16日

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

![](https://secure.gravatar.com/avatar/10af641b5ae0d58335058e8190ffb0c5fcb73128b58fb224dfe0cfe10808e218?
s=60&d=retro&r=g)

### 󠀁[Does the job with rewrite rules!](https://wordpress.org/support/topic/does-the-job-with-rewrite-rules/)󠁿

 [johnnyhuy](https://profiles.wordpress.org/johnnyhuy/) 2018年11月27日

Simple and straight forward to solve issues with rewrite rules.

![](https://secure.gravatar.com/avatar/ae0d29e1a30ddd9f97434ddd2d305821c67935c83dfcaf03ce826ca9774951f8?
s=60&d=retro&r=g)

### 󠀁[Great tool!](https://wordpress.org/support/topic/great-tool-832/)󠁿

 [Steven](https://profiles.wordpress.org/stgoos/) 2018年3月25日

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

![](https://secure.gravatar.com/avatar/0a51795a9532021f0f212d7601c520f887e847bc0e50aeeeb4f198d5295a49bc?
s=60&d=retro&r=g)

### 󠀁[The best plugin for this tasks!](https://wordpress.org/support/topic/the-best-plugin-for-this-tasks/)󠁿

 [andreykashops](https://profiles.wordpress.org/andreykashops/) 2017年11月7日

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

 [ 25件のレビューをすべて表示 ](https://wordpress.org/support/plugin/rewrite-rules-inspector/reviews/)

## 貢献者と開発者

Rewrite Rules Inspector はオープンソースソフトウェアです。以下の人々がこのプラグ
インに貢献しています。

貢献者

 *   [ Automattic ](https://profiles.wordpress.org/automattic/)
 *   [ Daniel Bachhuber ](https://profiles.wordpress.org/danielbachhuber/)
 *   [ Tim Moore ](https://profiles.wordpress.org/tmoorewp/)
 *   [ Gary Jones ](https://profiles.wordpress.org/garyj/)

“Rewrite Rules Inspector” は5ロケールに翻訳されています。 [翻訳者](https://translate.wordpress.org/projects/wp-plugins/rewrite-rules-inspector/contributors)
のみなさん、翻訳へのご協力ありがとうございます。

[“Rewrite Rules Inspector” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/rewrite-rules-inspector)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/rewrite-rules-inspector/)
するか、[SVN リポジトリ](https://plugins.svn.wordpress.org/rewrite-rules-inspector/)
をチェックするか、[開発ログ](https://plugins.trac.wordpress.org/log/rewrite-rules-inspector/)
を [RSS](https://plugins.trac.wordpress.org/log/rewrite-rules-inspector/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

[変更履歴](https://github.com/automattic/Rewrite-Rules-Inspector/blob/master/CHANGELOG.md)
をご覧ください。

## メタ

 *  バージョン **1.6.0**
 *  最終更新日 **3か月前**
 *  有効インストール数 **10,000+**
 *  WordPress バージョン ** 6.4またはそれ以降 **
 *  検証済み最新バージョン: **6.9.4**
 *  PHP バージョン ** 7.4またはそれ以降 **
 *  言語
 * [English (UK)](https://en-gb.wordpress.org/plugins/rewrite-rules-inspector/)、
   [English (US)](https://wordpress.org/plugins/rewrite-rules-inspector/)、[French (France)](https://fr.wordpress.org/plugins/rewrite-rules-inspector/)、
   [Japanese](https://ja.wordpress.org/plugins/rewrite-rules-inspector/)、[Polish](https://pl.wordpress.org/plugins/rewrite-rules-inspector/)、
   [Russian](https://ru.wordpress.org/plugins/rewrite-rules-inspector/).
 *  [プラグインを翻訳](https://translate.wordpress.org/projects/wp-plugins/rewrite-rules-inspector)
 * タグ
 * [rewrite rules](https://ja.wordpress.org/plugins/tags/rewrite-rules/)[tools](https://ja.wordpress.org/plugins/tags/tools/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/rewrite-rules-inspector/advanced/)

## 評価

 5つ星中5つ星

 *  [  25 5-星レビュー     ](https://wordpress.org/support/plugin/rewrite-rules-inspector/reviews/?filter=5)
 *  [  1 4-星レビュー     ](https://wordpress.org/support/plugin/rewrite-rules-inspector/reviews/?filter=4)
 *  [  0 3-星レビュー     ](https://wordpress.org/support/plugin/rewrite-rules-inspector/reviews/?filter=3)
 *  [  0 2-星レビュー     ](https://wordpress.org/support/plugin/rewrite-rules-inspector/reviews/?filter=2)
 *  [  0 1-星レビュー     ](https://wordpress.org/support/plugin/rewrite-rules-inspector/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/rewrite-rules-inspector/reviews/#new-post)

[すべてのレビューを見る](https://wordpress.org/support/plugin/rewrite-rules-inspector/reviews/)

## 貢献者

 *   [ Automattic ](https://profiles.wordpress.org/automattic/)
 *   [ Daniel Bachhuber ](https://profiles.wordpress.org/danielbachhuber/)
 *   [ Tim Moore ](https://profiles.wordpress.org/tmoorewp/)
 *   [ Gary Jones ](https://profiles.wordpress.org/garyj/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/rewrite-rules-inspector/)