Title: Vantorix &#8211; Subfolder Link Fixer
Author: Vantorix
Published: <strong>2026年10月12日</strong>
Last modified: 2026年10月12日

---

プラグインを検索

![](https://ps.w.org/vantorix-subfolder-link-fixer/assets/banner-772x250.png?rev
=3740677)

![](https://ps.w.org/vantorix-subfolder-link-fixer/assets/icon.svg?rev=3740677)

# Vantorix – Subfolder Link Fixer

 作者: [Vantorix](https://profiles.wordpress.org/itsrakibroni/)

[ダウンロード](https://downloads.wordpress.org/plugin/vantorix-subfolder-link-fixer.1.1.0.zip)

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

 [サポート](https://wordpress.org/support/plugin/vantorix-subfolder-link-fixer/)

## 説明

Links such as `/`, `/about-us/` or `/contact/` are handy because they work on any
domain. But when WordPress lives in a subfolder — for example `https://example.com/
demo/` — those links jump to the domain root and visitors land on the wrong page
or a 404.

**Subfolder Link Fixer** detects your site’s subfolder from the Home URL and quietly
fixes those links in the page sent to the browser:

 * `href="/"` becomes `href="/demo/"`
 * `href="/about-us/"` becomes `href="/demo/about-us/"`
 * Form actions like `action="/contact/"` are fixed too.

Nothing is written to your content. Your posts, menus and page-builder data stay
exactly as they were, so you can move the site back to a root domain, export it,
or switch the plugin off at any time.

#### Features

 * **Automatic subfolder detection** from the Home URL — nothing to configure.
 * **Choose what to fix:** links (`href`), form actions (`action`), images and scripts(`
   src`) and responsive images (`srcset`).
 * **Excluded paths:** keep links that should really leave the site, such as `/shop/`
   on the same domain, untouched.
 * **Manual subfolder** for sites served from a folder by a reverse proxy.
 * **Live link tester** on the settings screen shows exactly what visitors get.
 * **Automatic page-cache clearing** when settings change, for LiteSpeed Cache, 
   WP Rocket, W3 Total Cache, WP Super Cache and SiteGround Optimizer.
 * **Debug comment** for administrators with the number of links fixed on a page.
 * **Site Health** section under Tools  Site Health  Info.
 * **WP-CLI:** `wp subfolder-links status` and `wp subfolder-links test / /about-
   us/`.

#### Good for

 * Theme and template-kit demo sites hosted side by side, e.g. `example.com/kit-
   one/`, `example.com/kit-two/`.
 * Staging copies that live in a subfolder of the live domain.
 * Subdirectory Multisite networks — every subsite gets its own folder automatically.
 * Imported content or page-builder layouts that contain hard-coded `/` links.

#### What it leaves alone

 * Protocol-relative links (`//cdn.example.com/...`) and full URLs.
 * Links that already include the subfolder, and paths you exclude.
 * `data-*` attributes.
 * Admin screens, AJAX, REST API, feeds and the Elementor editor preview.
 * Sites installed at the domain root — the plugin simply stays idle.

#### For developers

 * `vantorix_slf_attributes` — array of attributes to rewrite.
 * `vantorix_slf_excluded_paths` — array of path prefixes to skip.
 * `vantorix_slf_should_run` — return `false` to skip the current request.
 * `vantorix_slf_purge_caches` — action fired after settings change; purge your 
   own cache here.

Example: skip rewriting on one page.

    ```
    add_filter( 'vantorix_slf_should_run', function ( $run ) {
        return is_page( 'landing' ) ? false : $run;
    } );
    ```

## スクリーンショット

[⌊Settings → Subfolder Link Fixer: status, attributes, advanced options and the 
live link tester.⌉⌊Settings → Subfolder Link Fixer: status, attributes, advanced
options and the live link tester.⌉[

Settings  Subfolder Link Fixer: status, attributes, advanced options and the live
link tester.

[⌊Before and after: a "/" link on a subfolder site sends visitors to the domain 
root; with the plugin it stays inside the site.⌉⌊Before and after: a "/" link on
a subfolder site sends visitors to the domain root; with the plugin it stays inside
the site.⌉[

Before and after: a “/” link on a subfolder site sends visitors to the domain root;
with the plugin it stays inside the site.

## インストール

 1. Go to Plugins  Add New, search for “Subfolder Link Fixer”, then install and activate.
    Or upload the zip from Plugins  Add New  Upload Plugin.
 2. Open Settings  Subfolder Link Fixer, check the detected subfolder and try a link
    in the tester.
 3. Done. If your cache plugin is one of the supported ones, it is cleared for you 
    when you save.

## FAQ

### Does it change my database or page-builder data?

No. Links are rewritten only in the HTML sent to visitors. The plugin stores only
its own settings. Deactivate it and everything is exactly as before.

### My site is at the domain root. Do I need this?

No. When there is no subfolder in your Home URL the plugin does nothing.

### Some links should go to the domain root on purpose.

Add their path to Excluded paths under Advanced, one per line, e.g. `/shop/`. Links
starting with that path are left alone.

### Should I enable src and srcset?

Only if your content has images or scripts with paths like `/wp-content/...` that
break in the subfolder. Links and form actions are enabled by default.

### Does it work with Elementor and other page builders?

Yes. It works on the final HTML, so it does not matter which builder or theme produced
the link. The Elementor editor preview is skipped so editing is not affected.

### Does it work with caching plugins?

Yes. Pages are cached after the links are fixed. LiteSpeed Cache, WP Rocket, W3 
Total Cache, WP Super Cache and SiteGround Optimizer are cleared automatically when
you change settings. For other caches, clear them once yourself.

### How can I check it is working?

Use the tester on the settings screen, turn on the debug comment and view the page
source, or run `wp subfolder-links test /about-us/`.

### Will it slow down my site?

The work is a single pattern replacement on the page output, which is very fast.
With a page cache it runs only when a page is generated.

### Does it work on Multisite?

Yes, on subdirectory networks. Each subsite uses its own folder from its own Home
URL. It can be network-activated.

## 評価

このプラグインにはレビューがありません。

## 貢献者と開発者

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

貢献者

 *   [ Vantorix ](https://profiles.wordpress.org/itsrakibroni/)

[“Vantorix – Subfolder Link Fixer” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/vantorix-subfolder-link-fixer)

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

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

## 変更履歴

#### 1.1.0

 * New: choose which attributes to fix — href, action, src and srcset (responsive
   images).
 * New: excluded paths.
 * New: manual subfolder for reverse-proxy setups.
 * New: page cache is cleared automatically when settings change (LiteSpeed Cache,
   WP Rocket, W3 Total Cache, WP Super Cache, SiteGround Optimizer).
 * New: debug comment for administrators showing how many links were fixed.
 * New: Site Health info section.
 * New: WP-CLI commands `wp subfolder-links status` and `wp subfolder-links test`.
 * Improved: link tester now follows excluded paths and the manual subfolder.
 * Changed: plugin name now uses a plain hyphen, matching other Vantorix plugins.

#### 1.0.0

 * Initial release.

## メタ

 *  バージョン **1.1.0**
 *  最終更新日 **8時間前**
 *  有効インストール数 **10未満**
 *  WordPress バージョン ** 5.8またはそれ以降 **
 *  検証済み最新バージョン: **7.1.3**
 *  PHP バージョン ** 7.4またはそれ以降 **
 *  言語
 * [English (US)](https://wordpress.org/plugins/vantorix-subfolder-link-fixer/)
 * タグ
 * [multisite](https://ja.wordpress.org/plugins/tags/multisite/)[relative links](https://ja.wordpress.org/plugins/tags/relative-links/)
   [staging](https://ja.wordpress.org/plugins/tags/staging/)[subdirectory](https://ja.wordpress.org/plugins/tags/subdirectory/)
   [subfolder](https://ja.wordpress.org/plugins/tags/subfolder/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/vantorix-subfolder-link-fixer/advanced/)

## 評価

レビューはまだ送信されていません。

[Your review](https://wordpress.org/support/plugin/vantorix-subfolder-link-fixer/reviews/#new-post)

[すべてのレビューを見る](https://wordpress.org/support/plugin/vantorix-subfolder-link-fixer/reviews/)

## 貢献者

 *   [ Vantorix ](https://profiles.wordpress.org/itsrakibroni/)

## サポート

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

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/vantorix-subfolder-link-fixer/)