Move WordPress uploads out of date-based folders afterwards
In this guide we show you how to remove 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 via WP-CLI or .htaccess redirects. You’ll also get tips on how to preserve your SEO ranking when moving files.

Short & sweet for a quick solution
- Install the neo Rename plugin
- In the backend go to Settings > neo WP > neo Rename and click the button "Move media from date folders to main uploads folder"
- Optionally, 301 redirects for SEO are created automatically
- Done! 🎉️
By default WordPress organizes uploaded files into year- and month-based folders (e.g. "wp-content/uploads/2025/09"). This option "Organize my uploads into month- and year-based folders" is enabled by default. Many site administrators 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 been discussed in the WordPress forum, on Reddit as well as 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, in one click, move all existing uploads from the year/month subfolders into the main uploads folder. On neo Rename’s 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/09/) into the main folder wp-content/uploads/. You don’t need to manually navigate 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 images embedded correctly 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 folders) 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 future uploads will land directly in the main uploads folder and won’t be created in date folders anymore.
All steps are performed safely & reliably in one go. It is still recommended to make a backup beforehand.
What else can neo Rename do?
Rename your image files, titles and slugs lightning-fast and improve your site’s SEO performance. All references are updated automatically – no broken database links anymore!
With neo Rename you optimize your media library and increase your site’s visibility.
👑 Pro: Benefit from additional SEO-friendly redirects to the new image URL!
All features of neoRename:
Why you won’t need subfolders in the future?
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 are not exclusive, an image can appear in multiple virtual collections at once. This is more flexible than any rigid folder structure.
Especially practical: neo Library shows an intelligent tag for each of your posts. This lets you see directly which posts reference your image 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 includes all functions you need for a thorough cleanup of your media library – from safely moving all files to the main uploads folder to automatically updating all database references and SEO-friendly 301 redirects. Test the plugin with the sandbox in your browser or download it directly.

Disable WordPress upload subfolders in settings manually
If you think about it before installing your WordPress instance, removing the date folders by turning off the corresponding option in WordPress is very simple. Go in the dashboard to Settings > Media > Upload Files. 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 work retroactively. WordPress does not move existing files automatically. All previously uploaded media keep their previous path (e.g. /uploads/2025/09/image.jpg). In the media library or in posts nothing changes initially. That means old images still have "/year/month/" in the URL while new uploads will be uploaded without this path. This results in an inconsistent structure unless further measures are taken. If you want a consistent result, you must move existing files manually or use something like neo Rename.
Why WordPress creates subfolders
WordPress has been applying year/month folders by default since version 2.7 because classic webservers used to have real problems with very large directories. On older hard drives 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. The chronological split ensured that only a manageable number of uploads landed in each directory 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, this was a simple, easy-to-understand order.
The date-path structure has some downsides: every 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 file systems (ext4, APFS, XFS) and SSD storage can manage hundreds of thousands of entries in a folder without noticeable slowdown. Websites are also usually delivered via caching layers, CDN, or object storage (S3, Wasabi & Co.), so the physical directory locally hardly matters anymore.
Solutions for removing year/month folders from file paths & 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 the files and adjusting the database. Theoretically you can also “remove” the date path without reshuffling the files (e.g., via a rewrite rule), but that only masks the problem and is recommended only in special cases. Nevertheless we also cover this solution approach.
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 several 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 break.
- 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 neo Library’s filter and tag system, folder structures are basically 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 plugin neo Rename is specifically developed to clean up WordPress media paths and makes the whole process beginner-friendly. So if your focus is on speed and safety, this solution is recommended.
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 renaming media files and moving 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.
- Using the plugin: With Media File Renamer Pro you can now reorganize your existing media. The plugin offers a bulk function to rename and move multiple files at once. You could move all files from a month folder into the main uploads folder. In the plugin interface you 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 likewise adjust all occurrences of the URL in posts. Check the result by spot-checking: 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 requests to old paths would produce a 404 error. You’d 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 handle renaming/moving. However, it requires more manual steps and oversight. You may have to proceed folder by folder and monitor the result. With many media items 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 would cause a conflict. In such cases you’d need to rename a file first to ensure unique names. So make sure no duplicate filenames exist before consolidating everything into one folder.
Conclusion: For advanced users, Media File Renamer Pro is an option to remove the “month folder.” If you already use the plugin, you can try the manual route. Otherwise neo Rename offers a purpose-built, 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 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 logically sorting by topic.
Functions at a glance:
- Create folders via drag & drop: a folder management 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 can appear in multiple folders.
- Server sync (Pro): folders created via FTP appear in the backend – practical for very large libraries.
The biggest advantage over purely “virtual” folder plugins: the folders actually exist on the file system. That allows images to be backed up via FTP or copied to CDN storage without losing the folder structure. For editorial teams that like thematic folders ("/products/", "/teamphotos/" 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’ll have to add redirects yourself via a redirect plugin or .htaccess – or go for the one-click solution neo Rename, which includes redirects. Also, drag-and-drop sorting with thousands of images takes some time; automatic tagging like in neo Library is not available here.
4) WP Original Media Path - adjust the upload path
The plugin WP Original Media Path takes a slightly different approach. It lets you change the WordPress uploads folder — something that was possible in core up to 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 upload 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 get rid of subfolders) or specify a completely new path (e.g. wp-content/uploads_all or wp-content/media). Save the setting. WordPress records the new path in 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 remove the year/month folders but keep the same main path, that means: move all files from the uploads/YYYY/MM/ subfolders 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 need to adjust 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. 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 consider serialized data as well.
After these steps all media will be available at the new path. Existing content will point to the new URL. WP Original Media Path informed WordPress of the changed path; you have to handle 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 a different directory or a separate domain/CDN. For simply removing the date folders within 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 option
For technically proficient users there is the option to remove the date folders without special plugins. For this, files must be moved manually and all database entries adjusted:
- Database backup: Always make a DB backup first! A wrong find & replace can ruin the database. 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 "2025/09/"), 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
tags. Additionally, attachment metadata in wp_postmeta — the _wp_attached_file entries — must be adjusted; these store the path relative to the uploads folder, e.g. "2025/09/image.jpg". In rare cases widgets, menus or theme options also reference images whose paths must be updated.
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=guid
This 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 use 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/09/ 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 widget configurations or _wp_attachment_metadata don’t break. WP-CLI's search-replace also respects serializations (as long as you’re not using 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 only serve as an internal unique identifier (and are used, for example, for RSS feeds). If you do a blanket search & replace you would catch the GUIDs as well. If possible, exclude the GUID column (Better Search Replace does this automatically in a standard run). WP-CLI offers --skip-columns=guid for this. If in doubt it’s not a disaster if the GUID is changed, it just needs to 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 that 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 appear 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 additional plugins (except possibly Better Search Replace, which you can remove afterwards) and you retain 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)
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 an accessed 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, complemented by a .htaccess redirect rule. Suppose you moved all files into the main directory. Now create a .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 this: If no real file is found under uploads/YYYY/MM/Filename, 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 subdirectories in filenames exist in the future). So calls like /uploads/2025/09/menue.pdf will be redirected to /uploads/menue.pdf. The [R=301] status ensures it is 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 point 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: Files stay in subfolders, internally rewrite to new short URLs: This is the opposite case: you keep the files physically where they are (in 2025/09 etc.) but want to show “short” URLs on the site and to visitors. That means you’d have to change post content to reference 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/09/image.jpg. This is more complicated because the server must somehow determine in which year folder the file resides. Writing a global rule for that is not trivial — you’d have to try all year/month combinations or have a fixed logic. If filenames are unique, you could try using a RewriteMap or a script to find the correct path, but that goes beyond standard .htaccess rules. In short: this variant is possible but labor-intensive and error-prone. In practice it’s rarely used. It’s easier to move the files or choose another approach above.
Use .htaccess redirects primarily as a supplement to catch old URLs after a restructure (Variant A). That preserves your images’ SEO juice and prevents 404s. If you use neo Rename you don’t need to worry about this — the plugin can add the redirects automatically.
FAQ & Troubleshooting
Backup & Security - Do I have to make a backup before I change 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 lets you restore 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 e.g. image.jpg exists in 2023/03 and in 2025/09. If so, rename one (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 also work in WordPress Multisite?
In multisite setups each subsite has its own upload path (uploads/sites/...). The “Organize into month/year folders” option exists per site. You’d have to handle each site separately. Also, under no circumstances should you put different sites into a common folder. Keep sites separated to avoid collisions.
SEO impact: Do years in image paths 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 about aesthetics and organization. Just remember to set redirects so existing index entries don’t lead to dead links — otherwise you could lose SEO value.
External links & Redirects: What happens to old image URLs that are already embedded elsewhere?
Without measures these would result in 404s once you move files or change paths. That’s why redirects are important. The neo Rename plugin handles this automatically via 301 redirects. If you do it manually, set up a .htaccess redirect rule (see above) or use a redirect plugin to point old to new URLs. Make sure redirects are permanent (301) so Google picks up the change. With correctly set redirects your images keep their “Google juice” and users following old links are seamlessly sent to the new address.
Rollback: Can I undo the change?
Theoretically yes, but not with a single button. You’d need to move the files back into their original folders and adjust the DB entries again (or restore from backup). The pro version of neo Rename offers an undo for individual renames, but a full rollback of folder structure also requires a backup. So think carefully and test first in a staging site.
Troubleshooting: What if single 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 an old folder?). Check database entries for an affected image (wp_posts and wp_postmeta for the attachment ID). If they still contain year folders you probably missed a search/replace. Also check write permissions in the uploads folder (uploads/ should be writable by WordPress, typically 755). If unsure, run a plugin like Regenerate Thumbnails. This plugin regenerates thumbnails based on the paths stored in the DB. If that fails, the path data is still incorrect.
Useful links about "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 flat folder & update postmeta
- WordPress.org Support – Organize uploads into 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 into wrong month/year folder
- WordPress.org Support – Multisite: adjust folder option per site
- WordPress Core Trac – Ticket #34759: Default disable option?
- 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 play it safe, the one-click solution with neoRename is recommended. It saves time and minimizes errors. Regardless of the chosen method: plan carefully, make backups, and set redirects to avoid SEO losses.
At the end of the day, it is primarily an aesthetic/organizational decision whether you want to keep the date structure. WordPress gives you the choice here. If you opt for “cleaner” upload URLs, you now have the appropriate solutions at hand.
The plugin neo Rename (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.