Move WordPress uploads out of date-based folders afterwards
In this guide we show you how to remove the subfolders from media URLs in WordPress after the fact. We present a one-click solution with the neo Rename plugin and compare alternative manual methods such as using WP-CLI or an .htaccess redirect. You’ll also get tips on how to maintain your SEO ranking when moving files.

Short & sweet — quick solution
- Install the neo Rename plugin
- In the backend under Settings > neo WP > neo Rename click the "Move media from date-folders to main uploads folder" button
- Optionally, the 301 redirects for SEO will be created automatically
- Done! 🎉️
By default, WordPress organizes uploaded files into year- and month-based folders (e.g. "wp-content/uploads/2025/12"). The option "Organize my uploads into month- and year-based folders" is enabled by default. Many site admins prefer shorter, cleaner URLs and want to remove the date path components from media URLs. Simply disabling this option later is not enough: files already uploaded remain in their year/month subfolders and keep the old URL structure. This issue has already been discussed in the WordPress forum, on Reddit and on Stack Overflow and Stack Exchange.
One-click solution — dissolve upload folder structure in WordPress afterwards

Move images with neo Rename
The fastest and simplest solution is the neo Rename plugin. With it you can, in one click, move all existing uploads from the year/month subfolders into the main uploads folder. On the neo Rename settings page you’ll find a special button that completely dissolves the upload folder structure.
One click is enough, and the plugin performs all necessary steps automatically:
- Move media files: All images, videos, PDFs, etc. are moved from the subfolders (e.g. wp-content/2025/12/) into the main folder wp-content/uploads/. You don’t have to manually work through FTP folders.
- Adjust database URLs: neo Rename finds every reference to these files in the database (posts, pages, media metadata, etc.) and replaces the old paths with the new path without dates. This keeps all images correctly embedded in posts — avoiding broken links. The plugin handles all occurrences in the database including serialized data such as PHP arrays when replacing.
- Redirects for old URLs: If external sites or Google have already indexed the old media URLs, neo Rename can set up SEO-friendly 301 redirects. A request to the old URL (with year/month folder) will then be automatically redirected to the new URL without the date path. Search engines and visitors will still reach the correct image despite the reorganization — valuable for SEO and preserving existing backlinks. This does not have to be done manually.
- Disable WordPress setting: The plugin also turns off the WordPress option "Organize my uploads into month- and year-based folders" so future uploads land directly in the main uploads folder and are no longer created in date folders.
All steps are performed safely & reliably in one go. However, it is still recommended to make a backup beforehand.
What else can neo Rename do?
Rename your images and videos lightning-fast and improve your website’s SEO performance. All references are automatically updated across the entire database.
With live preview, search-and-replace, batch processing and smart renaming rules you’ll optimize your media library in no time and boost your site’s visibility.
👑 Pro: SEO-friendly 301 redirects to the new image URL
All features of neoRename:
Why you won’t need subfolders anymore?
With the combination of neo Rename and neo Library, manual folder sorting is a thing of the past. You can keep all uploads in the root folder and still find any image in seconds. The neo Library plugin automatically assigns your media intelligent tags without manual sorting. Because tags aren’t exclusive, an image can appear in multiple virtual collections at once. This is more flexible than any rigid folder structure.
It’s particularly useful that neo Library shows an intelligent tag for each of your posts. That way you can see directly in which posts your image is referenced or which images are used in a post. Image references are detected not only in post content but also in ACF fields.
Try and download neo Rename directly
The neo Rename plugin contains all the features you need for a thorough cleanup of your media library — from safely moving all files into the main uploads folder to automatically updating all database references and SEO-friendly 301 redirects. Try the plugin with the in-browser sandbox or download it directly.

Disable WordPress upload subfolders manually in the settings
If you think about it before installing your WordPress instance, removing date folders by turning off the corresponding option in WordPress is very simple. In the dashboard go to Settings > Media > Uploads. There you’ll find the checkbox "Organize my uploads into month- and year-based folders". Uncheck it and save the settings. From now on WordPress will no longer place new uploads in subfolders but directly in "wp-content/uploads".

Important: This change does not apply retroactively. WordPress does not automatically move existing files. All previously uploaded media keep their original path (e.g. /uploads/2025/12/image.jpg). In the Media Library or in posts nothing changes initially. That means old images will still have "/year/month/" in the URL, while new uploads will be uploaded without that path going forward. This results in an inconsistent structure unless further steps are taken. So if you want a consistent result, you must move the existing files manually or use a tool like neo Rename, for example.
Why WordPress creates subfolders
WordPress has used year/month folders by default since version 2.7 because classic webservers used to have real problems with very large directories. On older drives and filesystems (ext3, FAT, NTFS without journaling) listing a folder with tens of thousands of files took significantly longer, and some backup tools or FTP clients had hard limits on entries per folder. The chronological split ensured that each directory contained only a manageable number of uploads and access times remained stable.
There was also a organizational benefit: someone blogging daily could quickly go to “/1990/12/” in the FTP directory tree and back up all December images at once. Especially in newsrooms without sophisticated media management that was a simple, understandable order.
The date-path structure brings some drawbacks: each image URL is unnecessarily lengthened by two segments, making it harder to read and more prone to typos. The folders implicitly reveal that your site runs on WordPress, and mix technical information (year, month) with semantically irrelevant file paths.
Today the technical reasons are largely obsolete. Modern filesystems (ext4, APFS, XFS) and SSD storage can handle hundreds of thousands of entries in a folder without noticeably slower listings. Websites are also usually delivered via caching layers, CDN or object storage (S3, Wasabi & co.), so the physical directory locally hardly matters anymore.
Ways to remove year/month folders from file paths & URLs
Besides the convenient neo Rename method there are several alternative approaches to tidy up file paths. Below we present different solutions – from plugin approaches to the developer method with WP-CLI. Important: many of these approaches require physically moving files and adjusting the database. Theoretically you can also “remove” the date path without moving the files (e.g. via a rewrite rule), but that only masks the problem and is recommended only in special cases. We still cover that approach too.
1) neo Rename - the one-click solution
We already described it in detail above: neo Rename offers the one-click solution specifically for this problem. Compared to the following methods, which sometimes require multiple steps, neo Rename is the most convenient and ideal if you want to reach the goal without technical effort. Advantages of neo Rename at a glance:
- One click, everything done: No switching between tools, no SQL, no manual work. The plugin button handles moving, search & replace in one go.
- No broken links: All internal links in WordPress are updated so posts & pages immediately use the new paths. Optional 301 redirects also ensure external links don’t lead to dead ends.
- Additional features: neo Rename can do more (optimize filenames for SEO, bulk renames, restore original names, etc.), helping you keep a tidy media library in the long run.
- neo Library compatibility: Thanks to neoLibrary’s filter and tag system, folder structures are unnecessary — you can still find your media quickly. neo Rename and neo Library complement each other perfectly to bring order to large media libraries.
Conclusion: The neo Rename plugin is specifically designed to clean WordPress media paths and makes the whole process beginner-friendly. If your focus is speed and safety, this solution is preferable.
2) Media File Renamer Pro - the manual way
An alternative plugin solution is Media File Renamer (by developer Jordy Meow). Its Pro version also allows you to rename media files and move them to other folders. You can proceed as follows:
- Preparation: First disable date-based uploads in WordPress as described above so new files don’t end up in subfolders again.
- Plugin use: With Media File Renamer Pro you can now reorganize your existing media. The plugin offers, for example, a bulk function to rename and move multiple files at once. You could move all files from a monthly folder to the main upload folder. In the plugin interface select the relevant media and either assign new filenames or keep them and use the option to move them to the main directory.
- Update references: Media File Renamer updates references in posts automatically when renaming. So if you move files to a different path, the plugin should adjust all occurrences of the URL in posts accordingly. Check the result spot-check: does the image still display in the post? Is the URL correct?
- Redirects: As far as we know, Media File Renamer does not create automatic redirects from old to new URLs. That means external links or direct calls to the old paths would produce a 404 error. You would therefore need to handle redirects separately (e.g. with a redirect plugin or via .htaccess).
Assessment: Media File Renamer Pro is powerful and can also accomplish renaming/moving. However, it requires more manual steps and oversight. You may need to proceed folder by folder and monitor the result. With many media files this can be time-consuming. Also be careful: if two files from different monthly folders have the same name, moving them into a common folder would cause a conflict. In such cases you would first have to rename one file to ensure unique names. Make sure there are no duplicate filenames before merging everything into one folder.
Conclusion: For advanced users Media File Renamer Pro is an option to get the “remove month folder” job done. If you already use the plugin you can try the manual way. Otherwise neo Rename offers a specifically tailored, simpler solution.
3) Media Library Folders – drag-and-drop folder management as a “middle way”
If you want to get rid of date folders but still keep a real directory structure, Media Library Folders (MLF) is a pragmatic compromise. The plugin adds a left folder sidebar to the WordPress Media Library and moves files physically on the server instead of just creating virtual categories. This keeps URLs clean while still logically sorting by topic.
Features at a glance:
- Create folders by drag & drop: A folder manager similar to Windows Explorer.
- Physical moving: When moving, MLF corrects all references in posts & pages automatically.
- Undo & bulk actions (Pro): Undo last action; move multiple files/folders at once.
- Multiple assignment (Pro): An image may appear in multiple folders.
- Server sync (Pro): FTP-created folders show up in the backend – practical for very large libraries.
The biggest advantage compared to purely “virtual” folder plugins: the folders really exist on the filesystem. That way you can back up images via FTP or copy them to CDN storage without losing the folder structure. For editorial teams that like thematic folders ("/products/", "/team-photos/", etc.) this is a familiar workflow and prevents filename collisions.
However, MLF does not create 301 redirects for old paths. If you come from the year/month structure you must add redirects yourself via a redirect plugin or .htaccess — or go straight for the one-click neo Rename solution, which includes redirects. Also, drag-and-drop sorting for thousands of images takes some time; automatic tagging like in neo Library is not available here.
4) WP Original Media Path - adjust upload path
The plugin WP Original Media Path follows a slightly different approach. It allows you to change the WordPress uploads folder — something that used to be possible in core until WordPress 3.5. With this plugin you can, for example, set your media to live under "wp-content/media/" instead of "wp-content/uploads/", or even use a subdomain for media. This affects the base uploads path. Important to know: WP Original Media Path is not retroactive — it does not automatically adjust existing entries. But you can use it to establish a new uniform structure and then switch manually. A possible procedure:
- Install the plugin and set the new path/URL. You could e.g. keep wp-content/uploads (if you only want to remove the subfolders) or specify a completely new path (e.g. wp-content/uploads_all or wp-content/media). Save the setting. WordPress writes the new path to the options (database) — all future uploads will go there.
- Move files: Now move the contents of the old uploads folder to the new location via FTP or shell. If you only want to dissolve the year/month folders and stay in the same main path, this means: move all files from the uploads/YYYY/MM/ subdirectories directly into uploads/. (You can delete the empty year folders afterwards.) If you chose a completely new path, move the entire directory accordingly.
- Database replace: Now you must update all references in the DB so WordPress finds the media under the new path. As described in the plugin docs, a search-and-replace operation is unavoidable. You search for the old base path (e.g. wp-content/uploads/2025/08/) and replace it with the new path (e.g. wp-content/uploads/). Practically this can be done with a plugin like Better Search Replace or with WP-CLI. Remember to account for serialized data.
After these steps all media are available under the new path. Existing content points to the new URL. WP Original Media Path has told WordPress the changed path; you have to do the rest yourself as with manual methods.
Use case: This plugin makes sense if you want, for example, a completely different storage location for uploads, such as another directory or a separate domain/CDN. For simply removing the date folders while keeping the same main folder it may be overkill, since the standard path (uploads) is retained. You could use WP Original Media Path to move all uploads into a subfolder “media” instead of “uploads”. Important: the plugin does not work with Multisite.
5) WP-CLI & Better Search Replace - developer variant
For technically savvy users there is the option to remove the date folders without special plugins. For this you must move the files manually and adjust all database entries:
- Database backup: Always create a DB backup first! A wrong search & replace can make the database unusable. Safety first.
- Move files manually: Use FTP with FileZilla or SSH with Termius or a script to move the files from the year/month folders into the main uploads/ folder. Pay very close attention to filename conflicts. If two files share the same name (e.g. image.jpg in "2023/03/" and again in "2025/12/"), they cannot both coexist in "uploads/".
- Database search & replace: Now all places in the DB that point to the old paths must be rewritten. This mainly affects the post_content column of posts and pages where images are embedded via img tags. Additionally, the attachment metadata in wp_postmeta or _wp_attached_file entries must be adjusted, which store the path relative to the uploads folder, e.g. "2025/12/image.jpg". In rare cases widgets, menus or theme options also reference images whose path must be adjusted.
The most convenient way is with the Better Search Replace plugin or via the WP-CLI command. Example WP-CLI command:wp search-replace '/wp-content/uploads/2025/08/' '/wp-content/uploads/' --skip-columns=guidThis would replace occurrences of the path string in all tables while skipping GUIDs. You would need to run this command per year/month combination or with regex (WP-CLI supports --regex). Alternatively use Better Search Replace in the WP backend, select all relevant tables and search e.g. for /wp-content/uploads/2025/12/ and replace with /wp-content/uploads/. Repeat for all existing year/month combinations. Serialized data: Better Search Replace handles serialized PHP data, which is important so that e.g. widget configurations or _wp_attachment_metadata are not broken. WP-CLI's search-replace also respects serializations (as long as you don't use regex mode).
In the wp_posts table every attachment post has a GUID entry with the original URL. It is recommended not to change these GUIDs, since they serve only as internal unique identifiers (and are e.g. important for RSS feeds). If you run a general search & replace operation you would, however, also hit the GUIDs. If possible, exclude the GUID column (Better Search Replace does this automatically in a standard run). WP-CLI offers --skip-columns=guid for that. If in doubt it's not the end of the world if the GUID is changed, it should just remain consistent and unique. - Clear cache: If you use a caching plugin like WP Fastest Cache or a CDN, clear the cache so the newly linked images are delivered immediately.
- Check: After the run verify that the media now load correctly without date folders. Especially in posts: do all images work? A quick way is to open the page and check the browser console for 404 errors. Thumbnails should still be visible in the media library. Also disable the browser cache in the developer console.
This manual method ultimately achieves the same result as the plugin solutions but requires great care and experience. Advantage: You don't need extra plugins (except possibly Better Search Replace, which you can remove afterward) and you have full control. Disadvantage: It is error-prone — a wrong search term or forgotten step can lead to broken images. And it is time-consuming, especially if many folders and files are affected.
6) .htaccess rewrite rule (redirect without moving files)
If you do not want to move the files but still want to change the URL structure externally, you can work with rewrite rules. One solution is to automatically redirect visitors from a requested URL with a date path to the corresponding URL without the date path or vice versa. Two approaches:
- Variant A: files were moved, redirect old URLs: This corresponds to the manual method supplemented by a .htaccess redirect rule. Assume you moved all files into the main directory. Now create a .htaccess in wp-content/uploads/ with the following content:
RewriteEngine On RewriteBase /wp-content/uploads/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([0-9]{4})/([0-9]{2})/(.*) /wp-content/uploads/$3 [L,R=301]This rule causes: if under uploads/YYYY/MM/filename no real file is found, send a 301 redirect to /uploads/filename. The placeholders
([0-9]{4})and([0-9]{2})capture year and month numbers, $3 stands for the filename possibly with a following path (in case there are subdirectories in the filename in the future). For example, calls to /uploads/2025/12/menue.pdf are redirected to /uploads/menue.pdf. The [R=301] status ensures it’s a permanent redirect (good for SEO). This solution is very elegant to catch existing external links or search engine index entries of the old URLs and route them to the new paths. It should be placed in the uploads directory (not in the main .htaccess) so it takes effect before WordPress. - Variant B: Keep files in subfolders, internally rewrite to new short URLs: This is the opposite case: you keep the files physically where they are (in 2025/12 etc.) but want to show “short” URLs on the site and to visitors. That means you’d have to change the content so links point to images without the date path. To make those links work without moving files, you need an internal rewrite rule that resolves a request to /uploads/image.jpg to the actual file location /uploads/2025/12/image.jpg. This is more complicated because the server must somehow determine which year folder the file is in. Writing a global rule for that isn’t trivial — you’d either have to try all year/month combinations or have a fixed logic. If filenames are unique, you could try using RewriteMap or a script to find the correct path, but that goes beyond standard .htaccess rules. In short: this variant is doable but complex and error-prone. In practice it’s rarely used. It’s simpler to move the files or choose one of the other approaches above.
Use .htaccess redirects mainly as a complement to catch old URLs after a restructuring (Variant A). That preserves your images’ SEO juice and prevents 404s. If you use neo Rename, you don’t have to worry about this — the plugin can add redirects automatically.
FAQ & Troubleshooting
Backup & Security - Do I need to make a backup before changing the folder structure?
Yes, absolutely! Changes to file paths and the database are potentially risky. Create a full backup beforehand (database and wp-content). That way you can restore the state if needed. Plugins like Better Search Replace explicitly warn against working without a backup.
Filename conflicts - What if files with the same name exist in different month folders?
If you merge all files into one folder, filenames must be unique. Check whether, for example, image.jpg exists in 2023/03 and in 2025/12. If so, rename one of them (e.g. image-2.jpg) before merging. Tools like neo Rename or Media File Renamer can help because they allow bulk renaming. Without that prep, moving may overwrite one file with another, causing data loss!
Multisite specifics: Does this also work with WordPress Multisite?
In multisite setups each subsite has its own upload path (uploads/sites/...). The “Organize into month/year folders” option is per site. You’d have to handle each site separately. Also, under multisite you should never place different sites into a shared folder. Keep separation by site to avoid collisions.
SEO impact: Do year numbers in the image path affect my SEO ranking?
No. Folder names don’t affect SEO. More important are the filename itself (keywords), alt texts, pagespeed, etc. Removing year folders won’t give a direct SEO boost nor hurt it. It’s mainly an aesthetic/organizational choice. Just be sure to set redirects so existing index entries don’t break — otherwise you could see SEO losses.
External links & redirects: What happens to old image URLs that are embedded elsewhere?
Without measures these would break (404) as soon as you move files or change paths. That’s why redirects are important. The neo Rename plugin handles this automatically with 301 redirects. If you do it manually, set up an .htaccess redirect rule (see above) or use a redirect plugin to point old to new URLs. Make them permanent (301) so Google adopts the change. With correct redirects your images keep their “Google juice” and users follow old links to the new address.
Rollback: Can I undo the change?
In theory yes, but not with a single button. You’d need to move files back to their original folders and adjust DB entries again (or restore from backup). The pro version of neo Rename offers an undo for individual renames, but fully reverting the folder structure also requires a backup. Think it through and ideally test in a staging environment first.
Troubleshooting: What if individual images are missing or loading incorrectly after the change?
Work systematically. Check the image path in the page HTML (is it correct or still pointing to the old folder?). Check DB entries for the affected image (wp_posts and wp_postmeta for the attachment ID). If those still contain year folders, you probably missed a search/replace. Also check upload folder permissions (uploads/ should remain writable by WordPress, typically 755). If unsure, run a plugin like Regenerate Thumbnails. That plugin regenerates thumbnails based on DB paths. If that fails, the path data is still incorrect.
Useful links on “WP uploads without subfolders”
- Stack Overflow – remove date from media and image URLs
- Stack Exchange – remove /year/month from uploaded media
- Reddit – move files to flat folder & update postmeta
- WordPress.org Support – Uploads in month/year folders
- WPDE.org – move WP uploads afterwards
- Stack Exchange – disable year/month folders for future uploads
- Stack Exchange – effects when toggling the folder option
- WordPress.org Support – media always uploads to wrong month/year folder
- WordPress.org Support – Multisite: adjust folder option per site
- WordPress Core Trac – Ticket #34759: option default disabled?
- Reddit – pros/cons of date folders discussion
- Reddit – adjust upload folder in WordPress
- WordPress.com Forum – media lands in wrong month folder
Conclusion
Removing year and month subfolders from media URLs can be achieved in various ways. For those who want to be safe, the one-click solution with neoRename is recommended. It saves time and minimizes errors. Regardless of the chosen path: plan carefully, make backups and set up redirects to avoid SEO loss.
At the end of the day it’s mainly an aesthetic/organizational choice whether to keep the date structure. WordPress gives you the option. If you choose cleaner upload URLs, you now have the appropriate solution paths.
The neo Rename plugin (part of the neo WP plugin suite) takes the work off your hands and also offers many features to optimize your media library - from bulk renaming to SEO redirects. Together with the other tools in the neo universe (neo Library, neo Replace, neo Optimize, etc.) you have everything to take your WordPress media management to the next level.