Move WordPress uploads out of date 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 WP-CLI or .htaccess redirects. You’ll also get tips on how to maintain your SEO ranking when moving files.

Quick & concise for a fast 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, 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/2026/02"). This 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. Turning this option off alone 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 as well as on Stack Overflow and Stack Exchange.
One-click solution - dissolve upload folder structure in WordPress afterwards

Move images with neo Rename
The fastest and easiest solution is the neo Rename plugin. With it you can move all existing uploads from year/month subfolders into the main uploads folder with one click. On neo Rename’s settings page you’ll find a dedicated 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/2026/02/) into the main folder wp-content/uploads/. You don’t have to manually work through FTP folders.
- Adjust database URLs: neo Rename finds all references 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 - broken links are avoided. The plugin accounts for 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 automatically redirect to the new URL without the date path. Search engines and visitors will therefore reach the correct image despite the restructuring - valuable for SEO and preserving existing backlinks. This does not need 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 that 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. Still, it’s recommended to make a backup beforehand.
What else can neo Rename do?
Rename your images and videos in a flash and improve your websites SEO performance. All references are automatically updated throughout the entire database.
Thanks to live preview, find-and-replace, batch processing, and intelligent renaming rules, youll optimize your media library in no time and boost your websites 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 main directory and still find any image in seconds. The neo Library plugin automatically assigns your media intelligent tags without manual sorting. Since tags aren’t exclusive, an image can appear in multiple virtual collections at once. This is more flexible than any rigid folder structure.
Especially practical is that neo Library shows an intelligent tag for each of your posts. That way you can see directly which posts reference your image or which images are used in a post. Image references are recognized not only in post content but also in ACF fields.
Try and download neo Rename directly
The neo Rename plugin includes all functions 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 setting up SEO-friendly 301 redirects. Test the plugin with the in-browser sandbox or download it directly.

Disable WordPress upload subfolders manually in Settings
If you think about this before installing your WordPress instance, removing the date-based 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 at the bottom "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 is not retroactive. WordPress does not automatically move existing files. All previously uploaded media keeps its existing path (e.g. /uploads/2026/02/image.jpg). Nothing changes immediately in the Media Library or in posts. 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 outcome, you must move existing files manually or use a tool like neo Rename.
Why WordPress creates subfolders
WordPress has used the year/month folders by default since version 2.7 because classic web servers used to have real problems with very large directories. On older disks and file systems (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. Chronological division ensured that each directory contained only a manageable amount of uploads and access times remained stable.
There was also an organizational benefit: someone who blogged daily could quickly go to “/1990/12/” in the FTP directory tree and back up all December images at once. Especially in editorial teams without sophisticated media management, that was a simple, comprehensible order.
However the date-path structure brings some downsides: 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 is running on WordPress, and they mix technical information (year, month) with semantically irrelevant file paths.
Today the technical reasons are largely obsolete. Modern file systems (ext4, APFS, XFS) and SSD storage can handle hundreds of thousands of entries in a folder without noticeably slower listing. Sites are usually delivered via caching layers, CDNs or object storage (S3, Wasabi & Co.), so the physical local directory hardly matters anymore.
Solutions to remove the year/month folders from file path & URL
Besides the convenient neo Rename method there are several alternative approaches to tidy up file paths. Below we present various solutions – from plugin solutions to the developer method with WP-CLI. Important: many of these approaches require physically moving files and updating the database. Theoretically you can also “remove” the date path without reshuffling files (e.g. via rewrite rule), but that only masks the issue and is recommended only in special cases. We still cover that approach as well.
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, find & 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 end up broken.
- Extra 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 become unnecessary - you can still quickly find your media. neo Rename and neo Library complement each other perfectly to bring order to large media libraries.
Conclusion: The plugin neo Rename is specifically designed to clean up WordPress media paths and makes the entire process beginner-friendly. If your focus is speed and safety, this solution is preferable.
2) Media File Renamer Pro - the manual route
An alternative plugin solution is Media File Renamer (by developer Jordy Meow). Its Pro version also allows renaming media files and moving them to other folders. You can proceed as follows:
- Preparation: First disable the date-based uploads in WordPress as described above so new files won't go into subfolders again.
- Using the plugin: With Media File Renamer Pro you can 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 month 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 another path the plugin should adjust all occurrences of the URL in posts accordingly. Check the result spot-check style: does the image still appear 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 yield a 404. You'd need to handle redirects separately (e.g. with a redirect plugin or via .htaccess).
Assessment: Media File Renamer Pro is powerful and can also handle renaming/moving. However, it requires more manual steps and oversight. You may need to proceed folder by folder and monitor the results. With many media files this can be time-consuming. Also be careful: if two files from different month folders have the same name, moving them into a common folder will create a conflict. In such cases you would first need to rename one file to ensure unique names. So make sure no duplicate filenames exist before merging everything into one folder.
Conclusion: For advanced users, Media File Renamer Pro is an option to perform the “remove month folders” job. If you already use the plugin, you can try the manual route. Otherwise, neo Rename offers a simpler solution tailored for this task.
3) Media Library Folders – drag-and-drop folder management as a “middle ground”
If you want to get rid of date folders but still keep a real directory structure, Media Library Folders (MLF) provides a pragmatic compromise. The plugin extends the WordPress media library with a left folder sidebar and physically moves files on the server instead of only creating virtual categories. This keeps URLs clean while still organizing content logically by topic.
Features at a glance:
- Create folders via drag & drop: A folder manager similar to Windows Explorer.
- Physical moving: When moving, MLF automatically corrects all references in posts & pages.
- Undo & bulk actions (Pro): Undo the last action; move multiple files/folders at once.
- Multiple assignment (Pro): An image may appear in multiple folders.
- Server sync (Pro): FTP-created folders appear in the backend – useful for very large libraries.
The biggest advantage over purely “virtual” folder plugins: the folders actually exist on the filesystem. That lets you back up images via FTP or copy them to CDN storage without losing the folder structure. For editorial teams who like thematic folders ("/products/", "/team-photos/", etc.), this is a familiar workflow and helps prevent filename collisions.
However, MLF does not create 301 redirects for old paths. If you come from a year/month structure, you'll need to handle redirects yourself via a redirect plugin or .htaccess – or use the one-click solution neo Rename, which includes redirects. Also, drag-and-drop sorting can take time with thousands of images; there is no automatic tagging like in neo Library.
4) WP Original Media Path - adjust upload path
The plugin WP Original Media Path takes a different approach. It lets you change the WordPress uploads folder - something that was 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 set up a new unified structure and then switch manually. A possible procedure:
- Install the plugin and set the new path/URL. You could keep wp-content/uploads (if you only want to remove the subfolders) or choose a completely new path (e.g. wp-content/uploads_all or wp-content/media). Save the setting. WordPress writes the new path into 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 folders but keep the same main path, this means moving all files from 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.
- Replace database entries: You must now update all references in the DB so WordPress can find the media at the new path. As described in the plugin documentation, a search-and-replace operation is unavoidable. 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 will be available under the new path. Existing content will point to the new URL. WP Original Media Path informs WordPress of the changed path; the rest you must handle yourself as with manual methods.
Use case: This plugin is useful if you want, for example, a completely different storage location for uploads, such as a different directory or a separate domain/CDN. For simply eliminating date folders within the same main folder it may be overkill, since the standard path (uploads) is retained. However, you could use WP Original Media Path to move all uploads into a "media" subfolder instead of "uploads". Important: the plugin does not work with multisite.
5) WP-CLI & Better Search Replace - developer option
For technically proficient users there is the option to remove date folders without special plugins. Files must be moved manually and all database entries adjusted:
- Database backup: First create a DB backup! A wrong search & replace can render the database unusable. Safety first.
- Move files manually: Use FTP with FileZilla or SSH with Termius or a script to move 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 "2026/02/"), they cannot both coexist in "uploads/".
- Database search & replace: Now all references 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
tags. Additionally, attachment metadata in wp_postmeta, specifically _wp_attached_file entries that store the path relative to the upload folder (e.g. "2026/02/image.jpg"), must be updated. In rare cases, widgets, menus, or theme options may also reference images whose paths need adjusting.
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/2026/02/ 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 things like widget configurations or _wp_attachment_metadata aren’t broken. WP-CLI’s search-replace also respects serializations (as long as you don’t use regex mode).
In the wp_posts table each attachment post has a GUID entry with the original URL. It's recommended not to change these GUIDs, since they serve only as an internal unique identifier (and are e.g. important for RSS feeds). If you run a general find & replace operation you'd catch the GUIDs too. If possible, exclude the guid column (Better Search Replace does this automatically in the default run). WP-CLI offers --skip-columns=guid for that. If in doubt it's not a disaster if the GUID is adjusted, 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 served immediately.
- Check: After the run verify the media now loads correctly without date folders. Especially in posts: do all images work? A quick way is to open the site 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 care and experience. Pro: You don't need extra plugins (except maybe Better Search Replace, which you can remove afterwards) and you keep full control. Con: It's error-prone - a wrong search term or a missed step can lead to broken images. And it's time-consuming, especially if many folders and files are affected.
6) .htaccess rewrite rule (redirect without moving)
If you don't want to move the files but still want to change the URL structure externally, you can work with rewrite rules. One solution is to 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 matches the manual method, complemented by an .htaccess redirect rule. Assuming you've moved all files to the main folder. Now create an .htaccess in wp-content/uploads/ with the following content:
RewriteEngine On\nRewriteBase /wp-content/uploads/\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule ^([0-9]{4})/([0-9]{2})/(.*) /wp-content/uploads/$3 [L,R=301]This rule does: 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})They catch year and month numbers, $3 stands for the filename with any following path (in case there were subdirectories in filenames in the future). So calls like /uploads/2026/02/menu.pdf are redirected to /uploads/menu.pdf. The [R=301] status ensures it’s a permanent redirect (SEO-wise sensible). This solution is very elegant for catching existing external links or search engine index entries of the old URLs and directing them to the new paths. It should be placed in the uploads directory (not the main .htaccess), so it takes effect before WordPress. - Variant B: Keep files in subfolders, internally rewrite to new short URLs: This is the reverse case: you leave files physically where they are (in 2026/02 etc.) but want to display “short” URLs on the site and to visitors. That means you’d need to change post content so it references images without the date path. To make those links work without moving files, you need an internal rewrite rule that resolves a request for /uploads/image.jpg to the actual file location /uploads/2026/02/image.jpg. This is more complicated because the server has to determine which year folder the file lives in. Writing a global rule for that is not trivial - you’d either have to try all year/month combinations or have a fixed logic. If filenames are unique, you could try using a RewriteMap or script to find the correct path, but that goes beyond standard .htaccess rules. In short: this variant is doable but labor-intensive and error-prone. In practice it’s rarely used. It’s usually easier to move the files or choose another approach above.
Use .htaccess redirects mainly as a complement to catch old URLs after a restructure (Variant A). That preserves your image SEO juice and prevents 404 errors. If you use neo Rename you don't need to worry about this. The plugin can add the redirects automatically.
FAQ & Troubleshooting
Backup & Safety - 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 first (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 consolidate all files into one folder, filenames must be unique. Check whether, for example, image.jpg exists in 2023/03 and in 2026/02. If so, you should 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 this preparation, moving may overwrite one file with another, causing data loss!
Multisite specifics: Does this 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 must proceed separately for each site. Also never put different sites into a common folder. Keep the per-site separation 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 harm it. It's mainly a matter of aesthetics and organization. Just set redirects so existing indexed entries don't lead to 404s - otherwise you could have SEO losses.
External links & redirects: What happens to old image URLs that are already embedded somewhere?
Without measures, these would lead to dead ends (404) as soon as you move the files or change the paths. That’s why redirects are so important. The neo Rename plugin handles this automatically via 301 redirects. If you work manually, it’s best to set up a .htaccess redirect rule (see above) or use a redirect plugin to point old URLs to new ones. Make sure to set the redirects as permanent (301) so Google adopts the change. With a properly set redirect, your images keep their “Google Juice” and users follow old links seamlessly to the new address.
Rollback: Can I undo the change?
Theoretically yes, but not with a single button. You’d have to move the files back to their original folders and adjust the DB entries again (or restore from a backup). The neo Rename plugin in the Pro version offers an undo function for individual renames, but a complete rollback of the folder structure also requires a backup. So think it through beforehand and ideally test first in a staging environment to see if everything works.
Troubleshooting: What if individual images are missing or loading incorrectly after the change?
Proceed systematically. Check the image path in the page HTML (is it correct, or still pointing to an old folder?). Inspect the database entries for an affected image (wp_posts and wp_postmeta for the attachment ID). If year folders are still present there, you may have missed a search-and-replace run. Also check upload folder write permissions (the uploads/ folder should remain writable for WordPress, typically 755). If you’re unsure, you can run a plugin like Regenerate Thumbnails. This plugin regenerates thumbnails based on the paths stored in the DB. If that fails, something is still wrong with the path information.
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 into a flat folder & update postmeta
- WordPress.org Support – Organize uploads into month/year folders
- WPDE.org – Move WP uploads retroactively
- Stack Exchange – Disable year/month folders for future uploads
- Stack Exchange – Impacts when toggling the folder option
- WordPress.org Support – Media always uploads to the wrong month/year folder
- WordPress.org Support – Multisite: Adjust folder option per site
- WordPress Core Trac – Ticket #34759: Option disabled by default?
- Reddit – Discussing pros/cons of date folders
- Reddit – Customize upload folder in WordPress
- WordPress.com Forum – Media lands in the wrong month folder
Conclusion
Removing year and month subfolders from media URLs can be achieved in various ways. For anyone who wants to be on the safe side, the 1-click solution with neoRename is recommended. It saves time and minimizes error sources. But regardless of the chosen method: plan carefully, make backups, and remember redirects to avoid SEO losses.
At the end of the day it’s primarily an aesthetic/organizational decision whether to keep the date structure. WordPress gives you the choice. If you opt for “cleaner” upload URLs, you now have the appropriate solutions at hand.
The neo Rename plugin (part of the neo WP plugin suite) takes the work off your hands and offers many features to optimize your media library – from bulk renames to SEO redirects. Together with the other tools in the neo universe (neo Library, neo Replace, neo Optimize, etc.) you’ve got everything to take your WordPress media management to the next level.