{"id":385041,"date":"2026-10-12T07:10:47","date_gmt":"2026-10-12T07:10:47","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/vantorix-subfolder-link-fixer\/"},"modified":"2026-10-12T12:47:33","modified_gmt":"2026-10-12T12:47:33","slug":"vantorix-subfolder-link-fixer","status":"publish","type":"plugin","link":"https:\/\/ja.wordpress.org\/plugins\/vantorix-subfolder-link-fixer\/","author":23533214,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"1.1.0","tested":"7.1.3","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"Vantorix - Subfolder Link Fixer","header_author":"Vantorix","header_description":"Makes root-relative links like \"\/\" and \"\/about-us\/\" work when WordPress is installed in a subfolder. Rewrites links on output only \u2014 nothing in your database changes.","assets_banners_color":"a594e1","last_updated":"2026-10-12 12:47:33","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/vantorix-subfolder-link-fixer\/","header_author_uri":"https:\/\/profiles.wordpress.org\/itsrakibroni\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":36,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"itsrakibroni","date":"2026-10-12 12:46:24","revision":3741554},"1.1.0":{"tag":"1.1.0","author":"itsrakibroni","date":"2026-10-12 12:47:33","revision":3741557}},"upgrade_notice":{"1.1.0":"<p>Adds src\/srcset support, excluded paths, automatic cache clearing, Site Health info and WP-CLI commands. Existing settings are kept.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3740677,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3740677,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3740677,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3740677,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3740677,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3741554,"resolution":"1","location":"assets","locale":"","width":1200,"height":950},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3740677,"resolution":"2","location":"assets","locale":"","width":1200,"height":540}},"screenshots":{"1":"Settings \u2192 Subfolder Link Fixer: status, attributes, advanced options and the live link tester.","2":"Before and after: a \"\/\" link on a subfolder site sends visitors to the domain root; with the plugin it stays inside the site."}},"plugin_section":[],"plugin_tags":[441,34925,19979,29816,29817],"plugin_category":[51],"plugin_contributors":[279939],"plugin_business_model":[],"class_list":["post-385041","plugin","type-plugin","status-publish","hentry","plugin_tags-multisite","plugin_tags-relative-links","plugin_tags-staging","plugin_tags-subdirectory","plugin_tags-subfolder","plugin_category-multisite","plugin_contributors-itsrakibroni","plugin_committers-itsrakibroni"],"banners":{"banner":"https:\/\/ps.w.org\/vantorix-subfolder-link-fixer\/assets\/banner-772x250.png?rev=3740677","banner_2x":"https:\/\/ps.w.org\/vantorix-subfolder-link-fixer\/assets\/banner-1544x500.png?rev=3740677","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/vantorix-subfolder-link-fixer\/assets\/icon.svg?rev=3740677","icon":"https:\/\/ps.w.org\/vantorix-subfolder-link-fixer\/assets\/icon.svg?rev=3740677","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/vantorix-subfolder-link-fixer\/assets\/screenshot-1.png?rev=3741554","caption":"Settings \u2192 Subfolder Link Fixer: status, attributes, advanced options and the live link tester."},{"src":"https:\/\/ps.w.org\/vantorix-subfolder-link-fixer\/assets\/screenshot-2.png?rev=3740677","caption":"Before and after: a \"\/\" link on a subfolder site sends visitors to the domain root; with the plugin it stays inside the site."}],"raw_content":"<!--section=description-->\n<p>Links such as <code>\/<\/code>, <code>\/about-us\/<\/code> or <code>\/contact\/<\/code> are handy because they work on any domain. But when WordPress lives in a subfolder \u2014 for example <code>https:\/\/example.com\/demo\/<\/code> \u2014 those links jump to the domain root and visitors land on the wrong page or a 404.<\/p>\n\n<p><strong>Subfolder Link Fixer<\/strong> detects your site's subfolder from the Home URL and quietly fixes those links in the page sent to the browser:<\/p>\n\n<ul>\n<li><code>href=\"\/\"<\/code> becomes <code>href=\"\/demo\/\"<\/code><\/li>\n<li><code>href=\"\/about-us\/\"<\/code> becomes <code>href=\"\/demo\/about-us\/\"<\/code><\/li>\n<li>Form actions like <code>action=\"\/contact\/\"<\/code> are fixed too.<\/li>\n<\/ul>\n\n<p>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.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li><strong>Automatic subfolder detection<\/strong> from the Home URL \u2014 nothing to configure.<\/li>\n<li><strong>Choose what to fix:<\/strong> links (<code>href<\/code>), form actions (<code>action<\/code>), images and scripts (<code>src<\/code>) and responsive images (<code>srcset<\/code>).<\/li>\n<li><strong>Excluded paths:<\/strong> keep links that should really leave the site, such as <code>\/shop\/<\/code> on the same domain, untouched.<\/li>\n<li><strong>Manual subfolder<\/strong> for sites served from a folder by a reverse proxy.<\/li>\n<li><strong>Live link tester<\/strong> on the settings screen shows exactly what visitors get.<\/li>\n<li><strong>Automatic page-cache clearing<\/strong> when settings change, for LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache and SiteGround Optimizer.<\/li>\n<li><strong>Debug comment<\/strong> for administrators with the number of links fixed on a page.<\/li>\n<li><strong>Site Health<\/strong> section under Tools \u2192 Site Health \u2192 Info.<\/li>\n<li><strong>WP-CLI:<\/strong> <code>wp subfolder-links status<\/code> and <code>wp subfolder-links test \/ \/about-us\/<\/code>.<\/li>\n<\/ul>\n\n<h4>Good for<\/h4>\n\n<ul>\n<li>Theme and template-kit demo sites hosted side by side, e.g. <code>example.com\/kit-one\/<\/code>, <code>example.com\/kit-two\/<\/code>.<\/li>\n<li>Staging copies that live in a subfolder of the live domain.<\/li>\n<li>Subdirectory Multisite networks \u2014 every subsite gets its own folder automatically.<\/li>\n<li>Imported content or page-builder layouts that contain hard-coded <code>\/<\/code> links.<\/li>\n<\/ul>\n\n<h4>What it leaves alone<\/h4>\n\n<ul>\n<li>Protocol-relative links (<code>\/\/cdn.example.com\/...<\/code>) and full URLs.<\/li>\n<li>Links that already include the subfolder, and paths you exclude.<\/li>\n<li><code>data-*<\/code> attributes.<\/li>\n<li>Admin screens, AJAX, REST API, feeds and the Elementor editor preview.<\/li>\n<li>Sites installed at the domain root \u2014 the plugin simply stays idle.<\/li>\n<\/ul>\n\n<h4>For developers<\/h4>\n\n<ul>\n<li><code>vantorix_slf_attributes<\/code> \u2014 array of attributes to rewrite.<\/li>\n<li><code>vantorix_slf_excluded_paths<\/code> \u2014 array of path prefixes to skip.<\/li>\n<li><code>vantorix_slf_should_run<\/code> \u2014 return <code>false<\/code> to skip the current request.<\/li>\n<li><code>vantorix_slf_purge_caches<\/code> \u2014 action fired after settings change; purge your own cache here.<\/li>\n<\/ul>\n\n<p>Example: skip rewriting on one page.<\/p>\n\n<pre><code>add_filter( 'vantorix_slf_should_run', function ( $run ) {\n    return is_page( 'landing' ) ? false : $run;\n} );\n<\/code><\/pre>\n\n<!--section=installation-->\n<ol>\n<li>Go to Plugins \u2192 Add New, search for \"Subfolder Link Fixer\", then install and activate. Or upload the zip from Plugins \u2192 Add New \u2192 Upload Plugin.<\/li>\n<li>Open Settings \u2192 Subfolder Link Fixer, check the detected subfolder and try a link in the tester.<\/li>\n<li>Done. If your cache plugin is one of the supported ones, it is cleared for you when you save.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20it%20change%20my%20database%20or%20page-builder%20data%3F\"><h3>Does it change my database or page-builder data?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"my%20site%20is%20at%20the%20domain%20root.%20do%20i%20need%20this%3F\"><h3>My site is at the domain root. Do I need this?<\/h3><\/dt>\n<dd><p>No. When there is no subfolder in your Home URL the plugin does nothing.<\/p><\/dd>\n<dt id=\"some%20links%20should%20go%20to%20the%20domain%20root%20on%20purpose.\"><h3>Some links should go to the domain root on purpose.<\/h3><\/dt>\n<dd><p>Add their path to Excluded paths under Advanced, one per line, e.g. <code>\/shop\/<\/code>. Links starting with that path are left alone.<\/p><\/dd>\n<dt id=\"should%20i%20enable%20src%20and%20srcset%3F\"><h3>Should I enable src and srcset?<\/h3><\/dt>\n<dd><p>Only if your content has images or scripts with paths like <code>\/wp-content\/...<\/code> that break in the subfolder. Links and form actions are enabled by default.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20elementor%20and%20other%20page%20builders%3F\"><h3>Does it work with Elementor and other page builders?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20caching%20plugins%3F\"><h3>Does it work with caching plugins?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"how%20can%20i%20check%20it%20is%20working%3F\"><h3>How can I check it is working?<\/h3><\/dt>\n<dd><p>Use the tester on the settings screen, turn on the debug comment and view the page source, or run <code>wp subfolder-links test \/about-us\/<\/code>.<\/p><\/dd>\n<dt id=\"will%20it%20slow%20down%20my%20site%3F\"><h3>Will it slow down my site?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20multisite%3F\"><h3>Does it work on Multisite?<\/h3><\/dt>\n<dd><p>Yes, on subdirectory networks. Each subsite uses its own folder from its own Home URL. It can be network-activated.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>New: choose which attributes to fix \u2014 href, action, src and srcset (responsive images).<\/li>\n<li>New: excluded paths.<\/li>\n<li>New: manual subfolder for reverse-proxy setups.<\/li>\n<li>New: page cache is cleared automatically when settings change (LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache, SiteGround Optimizer).<\/li>\n<li>New: debug comment for administrators showing how many links were fixed.<\/li>\n<li>New: Site Health info section.<\/li>\n<li>New: WP-CLI commands <code>wp subfolder-links status<\/code> and <code>wp subfolder-links test<\/code>.<\/li>\n<li>Improved: link tester now follows excluded paths and the manual subfolder.<\/li>\n<li>Changed: plugin name now uses a plain hyphen, matching other Vantorix plugins.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Makes root-relative links like \"\/\" and \"\/about-us\/\" work when WordPress is installed in a subfolder. No database changes.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/385041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=385041"}],"author":[{"embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/itsrakibroni"}],"wp:attachment":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=385041"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=385041"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=385041"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=385041"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=385041"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=385041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}