{"id":338442,"date":"2026-11-13T14:54:51","date_gmt":"2026-11-13T14:54:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/rootstuff-media-folders\/"},"modified":"2026-11-13T15:07:10","modified_gmt":"2026-11-13T15:07:10","slug":"rootstuff-media-folders","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/rootstuff-media-folders\/","author":6775047,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.3","stable_tag":"1.2.3","tested":"7.0.8","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Rootstuff Media Folders","header_author":"Adam Balee","header_description":"Organize your media library into real folders on the server. Moves files physically, updates database paths, rewrites content URLs, and creates 301 redirects.","last_updated":"2026-11-13 15:07:10","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/rootstuff.io\/rootstuff-media-folders","header_author_uri":"https:\/\/adambalee.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":107,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq","changelog"],"tags":{"1.2.3":{"tag":"1.2.3","author":"atomjb","date":"2026-11-13 15:07:10","revision":3800619}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3800596,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3800596,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3800596,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3800596,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3800596,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250},"banner.svg":{"filename":"banner.svg","revision":3800596,"resolution":false,"location":"assets","locale":false}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3800619,"resolution":"1","location":"assets","locale":"","width":1440,"height":757},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3800619,"resolution":"2","location":"assets","locale":"","width":1440,"height":757},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3800619,"resolution":"3","location":"assets","locale":"","width":1440,"height":757},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3800619,"resolution":"4","location":"assets","locale":"","width":1440,"height":757},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3800619,"resolution":"5","location":"assets","locale":"","width":1440,"height":757}},"screenshots":{"1":"The folder tree beside the media library grid. Folders are real directories inside wp-content\/uploads; selecting one shows the files that are physically inside it.","2":"Live folder search filters the tree as you type, with match highlighting at any depth.","3":"The Folder field in the attachment details modal. Changing it moves the file on the server, updates database paths, and creates a 301 redirect.","4":"The Folder Settings screen: move behavior options and the redirect log, where rules can be deleted.","5":"List mode with the folder tree, a folder filter, and a sortable folder column."}},"plugin_section":[],"plugin_tags":[88,9747,84,233,6655],"plugin_category":[50],"plugin_contributors":[262245],"plugin_business_model":[],"class_list":["post-338442","plugin","type-plugin","status-publish","hentry","plugin_tags-files","plugin_tags-folders","plugin_tags-media","plugin_tags-media-library","plugin_tags-organize","plugin_category-media","plugin_contributors-atomjb","plugin_committers-atomjb"],"banners":{"banner":"https:\/\/ps.w.org\/rootstuff-media-folders\/assets\/banner-772x250.png?rev=3800596","banner_2x":"https:\/\/ps.w.org\/rootstuff-media-folders\/assets\/banner-1544x500.png?rev=3800596","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/rootstuff-media-folders\/assets\/icon.svg?rev=3800596","icon":"https:\/\/ps.w.org\/rootstuff-media-folders\/assets\/icon.svg?rev=3800596","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/rootstuff-media-folders\/assets\/screenshot-1.png?rev=3800619","caption":"The folder tree beside the media library grid. Folders are real directories inside wp-content\/uploads; selecting one shows the files that are physically inside it."},{"src":"https:\/\/ps.w.org\/rootstuff-media-folders\/assets\/screenshot-2.png?rev=3800619","caption":"Live folder search filters the tree as you type, with match highlighting at any depth."},{"src":"https:\/\/ps.w.org\/rootstuff-media-folders\/assets\/screenshot-3.png?rev=3800619","caption":"The Folder field in the attachment details modal. Changing it moves the file on the server, updates database paths, and creates a 301 redirect."},{"src":"https:\/\/ps.w.org\/rootstuff-media-folders\/assets\/screenshot-4.png?rev=3800619","caption":"The Folder Settings screen: move behavior options and the redirect log, where rules can be deleted."},{"src":"https:\/\/ps.w.org\/rootstuff-media-folders\/assets\/screenshot-5.png?rev=3800619","caption":"List mode with the folder tree, a folder filter, and a sortable folder column."}],"raw_content":"<!--section=description-->\n<p>Most media folder plugins are <em>virtual<\/em>: they organize the media library screen but never touch the files on your server, which stay in year\/month folders. Rootstuff Media Folders is different \u2014 folders are <strong>real directories inside wp-content\/uploads<\/strong>, and the plugin keeps WordPress fully consistent when files move:<\/p>\n\n<ul>\n<li>Moves the original file <strong>and every generated thumbnail size<\/strong><\/li>\n<li>Updates <code>_wp_attached_file<\/code> and attachment metadata<\/li>\n<li>Updates the attachment GUID (optional)<\/li>\n<li>Rewrites file URLs in your post content (optional)<\/li>\n<li>Creates <strong>301 redirects<\/strong> from the old file location (optional), served automatically for any moved file<\/li>\n<li>Uploads go <strong>directly into the folder selected in the tree<\/strong> \u2014 no upload-then-move step; a default upload folder can also be set for everywhere else<\/li>\n<\/ul>\n\n<p>Because the filesystem itself is the source of truth, there is no folder taxonomy to fall out of sync \u2014 what you see is what is actually on your server. This is ideal for sites migrated from static HTML where files must keep a meaningful directory structure.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li><strong>Folder tree sidebar<\/strong> in the media library (grid and list mode) with expandable nested folders and file counts<\/li>\n<li><strong>Live folder search<\/strong> that filters the tree as you type, with match highlighting (Enter opens the first match)<\/li>\n<li><strong>Drag and drop<\/strong>: drag files onto a folder to physically move them (multi-select supported); drag folders onto folders to restructure the tree<\/li>\n<li><strong>Inline management<\/strong>: create, rename, and delete folders right in the tree \u2014 no page reloads<\/li>\n<li><strong>Folder Settings<\/strong> screen (under Media) with plugin settings and the redirect log<\/li>\n<li><strong>Folder filter<\/strong> dropdown in the media modal (post editor)<\/li>\n<li><strong>Move to folder\u2026<\/strong> bulk action in the media library list view<\/li>\n<li><strong>Folder field<\/strong> on every attachment's edit screen and in the media modal<\/li>\n<li><strong>Folder column<\/strong> in the media library list table<\/li>\n<li>Renaming a folder updates every attachment inside it (at any depth) and adds a single prefix redirect<\/li>\n<li>Redirect chains are collapsed automatically (A\u2192B then B\u2192C becomes A\u2192C)<\/li>\n<li>Developer hooks: <code>rsmf_attachment_moved<\/code>, <code>rsmf_folder_created<\/code>, <code>rsmf_folder_renamed<\/code>, <code>rsmf_folder_deleted<\/code>, <code>rsmf_upload_folder<\/code>, <code>rsmf_move_capability<\/code>, <code>rsmf_manage_capability<\/code><\/li>\n<\/ul>\n\n<h4>What it deliberately does not do<\/h4>\n\n<ul>\n<li>It never overwrites an existing file \u2014 moves that would collide are skipped with a clear error.<\/li>\n<li>Only empty folders can be deleted.<\/li>\n<li>Post meta is not rewritten automatically (it may contain serialized data). Use the <code>rsmf_attachment_moved<\/code> action to update custom storage.<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20are%20redirects%20served%3F\"><h3>How are redirects served?<\/h3><\/dt>\n<dd><p>On standard WordPress rewrite setups (Apache with the WordPress .htaccess rules, or nginx with try_files), a request for a file that no longer exists falls through to WordPress. The plugin intercepts the resulting 404 and issues a 301 to the file's new location.<\/p><\/dd>\n<dt id=\"does%20this%20work%20with%20page%20builders%20or%20custom%20fields%3F\"><h3>Does this work with page builders or custom fields?<\/h3><\/dt>\n<dd><p>URLs inside post content are rewritten. URLs stored in post meta or options are not (rewriting serialized data blindly is unsafe), but the 301 redirects keep those references working. The <code>rsmf_attachment_moved<\/code> action lets you update custom storage yourself.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20very%20large%20media%20libraries%3F\"><h3>Does it work with very large media libraries?<\/h3><\/dt>\n<dd><p>Folder filtering matches against the <code>_wp_attached_file<\/code> meta value, which WordPress does not index. Libraries in the tens of thousands of attachments work fine; at hundreds of thousands, media queries with a folder filter may slow down. If that is your scale, adding a database index on <code>wp_postmeta (meta_key, meta_value(191))<\/code> restores fast filtering.<\/p><\/dd>\n<dt id=\"is%20multisite%20supported%3F\"><h3>Is multisite supported?<\/h3><\/dt>\n<dd><p>Version 1.0 targets single-site installs. On multisite, activate it per-site rather than network-wide.<\/p><\/dd>\n<dt id=\"what%20happens%20on%20uninstall%3F\"><h3>What happens on uninstall?<\/h3><\/dt>\n<dd><p>The settings option and the redirects table are removed. Your files and folders are left exactly where they are.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>Readme: screenshot captions updated for the wp.org listing. No code changes.<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Fixed: the \"Drop files to upload\" panel in the media grid was misplaced and partially hidden behind the toolbar.<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Fixed: folder navigation in the media grid stopped working after the attachment details modal had been opened (WordPress reassigns wp.media.frame to the modal; the tree now reads the grid frame from wp.media.frames.browse).<\/li>\n<li>Fixed: folder counts in the tree did not update after moving a file via the folder select in the attachment details modal.<\/li>\n<li>Redirect rules can now be deleted from the redirect log on the Folder Settings screen.<\/li>\n<li>Fixed: moving a file back to a previous location left behind a circular self-redirect. Self-redirects are no longer created, and existing ones are cleaned up on the next move.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Renamed plugin to Rootstuff Media Folders. All internal prefixes changed from <code>pmf<\/code>\/<code>PMF<\/code> to <code>rsmf<\/code>\/<code>RSMF<\/code>, including the settings option (<code>rsmf_settings<\/code>), the redirects table (<code>rsmf_redirects<\/code>), and the developer hooks (<code>rsmf_attachment_moved<\/code>, <code>rsmf_folder_created<\/code>, <code>rsmf_folder_renamed<\/code>, <code>rsmf_folder_deleted<\/code>, <code>rsmf_upload_folder<\/code>, <code>rsmf_move_capability<\/code>, <code>rsmf_manage_capability<\/code>).<\/li>\n<\/ul>\n\n<h4>1.1.19<\/h4>\n\n<ul>\n<li>The modal attachments grid is now positioned from the measured toolbar height instead of a fixed offset, so thumbnails are never clipped regardless of modal variant (labeled filters, wrapped controls) or window size. The New Folder button matches the 32px control height.<\/li>\n<\/ul>\n\n<h4>1.1.18<\/h4>\n\n<ul>\n<li>Fixed the folder combobox inside the media modal: the dropdown panel is now fixed-positioned so it escapes the details sidebar's scroll clipping (with flip-up near the bottom of the screen), the input shows the full folder path instead of an ambiguous indented basename, and the label no longer reads a transient value mid filter-change.<\/li>\n<li>Fixed the modal toolbar: the folder filter and New Folder button sat behind the thumbnails (core's toolbar has a fixed height); they now get their own row and the grid moves down to make room.<\/li>\n<\/ul>\n\n<h4>1.1.17<\/h4>\n\n<ul>\n<li>The media modal (including the block editor's \"Media Library\" flow) is now a full folder workflow: uploads made in the modal land in the folder selected in its dropdown, and a New Folder button creates folders inline \u2014 the new folder becomes the active filter and upload destination.<\/li>\n<li>New uploads appear immediately in folder-filtered modal views (the upload-queue observation patch now covers the modal, not just the library grid).<\/li>\n<\/ul>\n\n<h4>1.1.16<\/h4>\n\n<ul>\n<li>Block editor (REST API) uploads now respect the folder routing, so the default upload folder applies to Gutenberg uploads too.<\/li>\n<li>Moving files now requires edit permission on each attachment, not just upload_files \u2014 moves rewrite URLs in post content, so Authors can no longer indirectly edit content they cannot edit directly.<\/li>\n<li>Prefix redirects match with LOCATE instead of LIKE, so folder names containing underscores no longer over-match unrelated paths.<\/li>\n<li>Folder renames record their redirect before updating attachments, so files stay reachable even if the update is interrupted mid-way.<\/li>\n<li>Large bulk-move selections are passed via a transient instead of the URL, and batch moves reset the PHP time limit per file.<\/li>\n<li>List rows no longer stay drag-enabled after a click, restoring filename text selection.<\/li>\n<li>The folder list ships once on the library screen instead of twice; assorted small cleanups.<\/li>\n<\/ul>\n\n<h4>1.1.15<\/h4>\n\n<ul>\n<li>Fixed sporadic dead clicks on tree folders. Three causes: clicks landing during a background tree re-render lost their row (folder activation is now a single delegated listener on the stable container); tiny mouse movements promoted clicks to drags which browsers then swallow (a drag that ends within a few pixels of where it started, undropped, is now treated as the click it was meant to be); and passive count refreshes briefly disabled pointer events on the whole sidebar (they no longer do).<\/li>\n<li>Grid folder clicks retry once if the media frame is mid-transition instead of silently dropping.<\/li>\n<\/ul>\n\n<h4>1.1.14<\/h4>\n\n<ul>\n<li>Fixed: the searchable folder box now matches the exact height of the neighboring dropdowns (32px); a broader admin input rule was inflating it to 40px. Grid toolbar controls aligned to the same height.<\/li>\n<\/ul>\n\n<h4>1.1.13<\/h4>\n\n<ul>\n<li>Every folder select is now a searchable combobox: type to filter with match highlighting, arrow keys + Enter to choose. Applies to the grid and list filters, the attachment folder field, the Upload to folder picker, the default-upload-folder setting, and the bulk-move destination. No external libraries; the native select stays as the source of truth.<\/li>\n<\/ul>\n\n<h4>1.1.12<\/h4>\n\n<ul>\n<li>Fixed: dragging a file from the grid onto a folder now works reliably. Core's \"Drop files to upload\" overlay appears on any drag (it never checks the payload) and was swallowing the drop before it reached the folder tree; the overlay is now suppressed during internal move-drags only. Drag-to-upload from your desktop is unaffected.<\/li>\n<li>Grid tiles are marked draggable proactively, and a hint appears in the sidebar while dragging.<\/li>\n<\/ul>\n\n<h4>1.1.11<\/h4>\n\n<ul>\n<li>Added a Search Media button to the grid toolbar, matching the list view.<\/li>\n<\/ul>\n\n<h4>1.1.10<\/h4>\n\n<ul>\n<li>The grid toolbar now uses the same two-row layout as the list view: all dropdowns on one row, search below.<\/li>\n<\/ul>\n\n<h4>1.1.9<\/h4>\n\n<ul>\n<li>List view filters and search are now fully async: the media type, date, and folder dropdowns apply on change, search filters as you type (keeping focus), and pagination \/ sort links swap in place. Bulk actions still submit normally.<\/li>\n<li>The grid toolbar controls are restyled to match the classic list-view look, and the grid search label is visually hidden like the list view's.<\/li>\n<\/ul>\n\n<h4>1.1.8<\/h4>\n\n<ul>\n<li>List mode now filters asynchronously: clicking a folder swaps the list table in place instead of reloading the page. URLs and the browser back\/forward buttons still work, with a full-navigation fallback if the fetch fails.<\/li>\n<\/ul>\n\n<h4>1.1.7<\/h4>\n\n<ul>\n<li>The Media &gt; Folders page is now Media &gt; Folder Settings: settings and the redirect log only. All folder management lives in the media library sidebar.<\/li>\n<li>New \"collapse all folders\" button in the tree header.<\/li>\n<\/ul>\n\n<h4>1.1.6<\/h4>\n\n<ul>\n<li>Fixed: folders named like file extensions (mp3, jpg, pdf, \u2026) showed no files when filtered. Folder path segments are no longer run through sanitize_file_name(), which rewrites extension-like names to \"unnamed-file.\"; a dedicated folder-name sanitizer strips the same unsafe characters without filename semantics.<\/li>\n<\/ul>\n\n<h4>1.1.5<\/h4>\n\n<ul>\n<li>Fixed: new uploads now appear in the grid immediately when a folder filter is active (core only lets queries with allowlisted args watch the upload queue; folder-filtered queries are now included).<\/li>\n<li>The folder tree refreshes its counts and shows a confirmation notice when uploads finish.<\/li>\n<\/ul>\n\n<h4>1.1.4<\/h4>\n\n<ul>\n<li>Fixed: uploads from media-new.php ignored the chosen folder (the legacy async-upload flow sends no action parameter and was not recognized as a media upload).<\/li>\n<\/ul>\n\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>\"Upload to folder\" picker on the Add Media File screen (media-new.php), preselected from the folder you were viewing.<\/li>\n<li>The list view's Add Media File link now carries the current folder along.<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Uploads now land directly in the folder currently selected in the tree sidebar.<\/li>\n<li>Fixed the grid-mode layout so the attachments grid sits beside the sidebar.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>New folder tree sidebar in the media library (grid and list modes) with expandable folders.<\/li>\n<li>Drag and drop files onto folders to move them physically; drag folders to restructure.<\/li>\n<li>Inline folder create\/rename\/delete with AJAX (no page reloads).<\/li>\n<li>Spring-loaded folders: hovering during a drag expands the folder.<\/li>\n<li>Live folder search box in the sidebar with match highlighting.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Organize your media library into real folders on the server \u2014 not virtual ones. Files are physically moved and every database path is updated.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/338442","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=338442"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/atomjb"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=338442"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=338442"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=338442"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=338442"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=338442"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=338442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}