{user_name}
Removing date folders from year and month subfolders in the WordPress Media Library for images

Move WordPress uploads out of date folders afterwards

In this guide we show you how to remove the subfolders from media URLs in WordPress afterwards. 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.

Move WordPress media from year/month folders into the main uploads folder afterwards. Visualization of the folders.

Short & quick solution

  1. Install the neo Rename plugin
  2. In the backend under Settings > neo WP > neo Rename click the button "Move media from date folders into main uploads folder"
  3. Optionally, the 301 redirects for SEO are created automatically
  4. Done! 🎉️

By default WordPress organizes uploaded files into year- and month-based folders (e.g. "wp-content/uploads/2025/11"). 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 segments 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

Remove year/month subfolders from the image URL and file path by moving media into the main uploads directory

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/11/) 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 the date. This keeps all images embedded in posts correctly — 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 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 land directly in the main uploads folder and are no longer created in date folders.

All steps are performed safely & reliably in one go. It is still recommended to make a backup beforehand.

What else can neo Rename do?

Quickly rename your images and videos 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 increase your site’s visibility.

👑 Pro: SEO-friendly 301 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 leave 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.

It’s especially handy 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 detected not only in post content but also in ACF fields.

Try and download neo Rename directly

The neo Rename plugin includes all the 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 SEO-friendly 301 redirects. Try the plugin with the sandbox in the browser or download it directly.

Screenshot neo Rename - Media Renamer for WordPress images to rename filename, title and slug for SEO optimization
Band Coming Soon - neo WP Plugin for WordPress will be released soon
WordPress Media Plugin Rename - animated logo - title, URL, path, slug and filename of an image are renamedOverlay - This plugin icon was drawn with neo Draw and animated with neo Draw and neo Motion.

neo Rename

Rename images efficiently and maximize SEO ranking!

neoRename.zip
To the plugin

Disable WordPress upload subfolders manually in the settings

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. In the dashboard go to Settings > Media > Uploading Files. There you’ll find the checkbox "Organize my uploads into month- and year-based folders". Uncheck it and save the settings. From then on WordPress will not place new uploads in subfolders but directly in "wp-content/uploads".

Settings page in WordPress under Media with checkbox "Organize my uploads into month- and year based folders"

Important: This change does not apply retroactively. WordPress does not automatically move already existing files. All previously uploaded media will keep their current path (e.g. /uploads/2025/11/image.jpg). In the media library or in posts nothing changes at first. That means old images will still have "/year/month/" in the URL, while new uploads will be uploaded without that path in the future. 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

Since version 2.7, WordPress has used year/month folders by default because classic web servers used to have real problems with very large directories. On older hard drives and file systems (ext3, FAT, NTFS without journaling) listing a directory with tens of thousands of files took noticeably longer, and some backup tools or FTP clients had hard limits on entries per folder. Splitting chronologically ensured that each directory only contained a manageable number of uploads and access times remained stable.

There was also a 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, understandable order.

The date-path structure does bring some disadvantages: 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 noticeable slowdown. Websites are usually delivered via caching layers, CDNs, or object storage (S3, Wasabi & Co.), so the physical directory on the server hardly matters anymore.

Ways to remove year/month folders from the file path & URL

Besides the convenient neo Rename method, there are some alternative approaches to tidy up file paths. Below we present different solutions – from plugin options 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 reshuffling 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 as well.

1) neo Rename - the one-click solution

We already described it 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 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 long-term.
  • neo Library compatibility: Thanks to neo Library’s filter and tag system, folder structures become unnecessary — you can still find your media quickly. neo Rename and neo Library complement each other perfectly to organize 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 to be preferred.

To the neo Rename plugin

2) Media File Renamer Pro - the manual route

An alternative plugin solution is offered by 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 won’t again end up in subfolders.
  • Using the plugin: 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 into the main uploads 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 results spot-check: Is the image still displayed 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 lead to a 404. You’d need to handle redirects separately (e.g. with a redirect plugin or via .htaccess).

Assessment: For advanced users Media File Renamer Pro is an option to perform the “remove month folder” job. However it requires more manual steps and monitoring. You may need to proceed folder by folder and keep an eye on the results. With many media files this can be time-consuming. Also be careful: if two files from different month folders share the same name, moving them into a common folder will cause a conflict. In such cases you’d have to rename one file first 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 get the job done. If you already use the plugin you can try the manual route. Otherwise neo Rename offers a more 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) offers a pragmatic compromise. The plugin adds a left folder sidebar to the WordPress media library and moves files physically on the server instead of creating only virtual categories. That way URLs stay clean while still being logically sorted by topic.

Features 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 the 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 really exist on the file system. That allows you to 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’ll need to add redirects yourself via a redirect plugin or .htaccess — or go straight for the one-click solution neo Rename, which includes redirects. Also, drag-and-drop sorting can take some time with thousands of images; 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 was possible in core WordPress until version 3.5. With this plugin you can, for example, set your media to reside 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 establish a new consistent structure and then switch manually. A possible procedure:

  • Install the plugin and set the new path/URL. You could, for example, keep wp-content/uploads (if you only want to remove the date 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 remove the year/month folders and keep the same main path, that means: move all files from the uploads/YYYY/MM/ subdirectories directly into uploads/. (You can then delete the empty year folders.) If you chose a completely new path, move the entire directory accordingly.
  • Database replace: Now you must adjust all references in the DB so WordPress finds the media under 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 as well.

After these steps all media are available at the new path. Existing content points to the new URL. WP Original Media Path informed WordPress of the changed path; you must do the remaining work 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 removing the date folders while keeping the same main folder it may be overkill, since the standard path (uploads) is retained. You could, however, 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 you must manually move the files and update all database entries:

  • Database backup: Always create a DB backup first! A faulty search & replace can render the database unusable. Safety first.
  • Manually move files: 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 have the same name (e.g. image.jpg in "2023/03/" and again in "2025/11/"), 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 or _wp_attached_file entries must be adjusted, which store the path relative to the uploads folder, e.g. "2025/11/image.jpg". In rare cases widgets, menus or theme options may also reference images whose paths need updating.
    The most convenient way is with the Better Search Replace plugin or via a 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/11/ 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 things like widget configurations or _wp_attachment_metadata are not broken. WP-CLI's search-replace also respects serializations (as long as you don't use the regex mode).
    In the wp_posts table each attachment post has a GUID entry with the original URL. It is advisable not to change these GUIDs, since they serve only as an internal unique identifier (and are important for RSS feeds, for example). If you run a general search & replace operation you would also touch 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. In doubt it's not catastrophic if the GUID is changed, it should only 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 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 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 retain full control. Disadvantage: It is error-prone — a wrong search term or a missed 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 use rewrite rules. One possible 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. Suppose 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 would be subdirectories in the filename in the future). Thus, calls like /uploads/2025/11/menue.pdf are 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 direct 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 remain in subfolders, internally rewrite to new short URLs: This is the reverse case: you keep the files physically where they are (in 2025/11 etc.), but want to display “short” URLs on the site and to visitors. That means you’d have to change the content of posts so they reference the images without the date path. For these links to work without moving the files, you need an internal rewrite rule that resolves a request to /uploads/image.jpg to the actual file location /uploads/2025/11/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 would need to try all year/month combinations or have a fixed logic. If filenames are unique, one could try to find the correct path via RewriteMap or a script, but that goes beyond standard .htaccess rules. In short: this variant is possible but effortful and error-prone. In practice it is rarely used. It would be easier to move the files or choose another of the approaches above.

Use .htaccess redirects mainly as a supplementary measure to catch old URLs after a restructuring (Variant A). That preserves the SEO juice of your images 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 & 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 monthly folders?

If you merge all files into one folder, filenames must be unique. So check whether e.g. image.jpg exists in 2023/03 and in 2025/11. If so, you should rename one of them (e.g. image-2.jpg) before combining. Tools like neo Rename or Media File Renamer can help, as they allow bulk renaming. Without this preparation, moving may overwrite one file with another, which can lead to 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 exists per site. You would need to proceed separately for each site. Also, under no circumstances should you put different sites into a shared folder. Keep the separation by site to avoid collisions.

SEO impact: Do year numbers in image paths affect my SEO ranking?

No. Folder names do not impact SEO. More important are the filename itself (keyword relevance), alt texts, page speed, etc. Removing the year folders therefore neither provides a direct SEO boost nor harms it. It is primarily a matter of aesthetics and organization. Just make sure to set redirects so existing index entries don't break — otherwise you might see SEO losses.

External links & redirects: What happens to old image URLs that are already embedded somewhere?

Without measures, those would break (404) once you move files or change paths. That’s why redirects are so important. The neo Rename plugin handles this automatically via 301 redirects. If you work manually, set up a .htaccess redirect rule (see above) or use a redirect plugin to point old to new URLs. Make sure the redirects are permanent (301) so Google adopts the change. With correctly set redirects, your images retain 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 would have to move the files back to their original folders and adjust the DB entries again (or restore from backup). The neo Rename plugin in the Pro version offers an undo function for individual renames, but a full rollback of folder structure also requires a backup. So consider carefully before proceeding and ideally test first in a staging environment or test site.

Troubleshooting: What if some images are missing or loaded 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 they still reference year folders, you probably missed a search-and-replace. Also check upload folder write permissions (the uploads/ folder should remain writable by WordPress, usually 755). If unsure, you can run a plugin like Regenerate Thumbnails. This plugin regenerates thumbnails based on the paths stored in the DB. If that fails, there is still something wrong with the path entries.

Conclusion

Removing year and month subfolders from media URLs can be achieved in various ways. For those who want to be safe, the 1-click solution with neoRename is recommended. It saves time and minimizes error sources. Regardless of the chosen path: plan carefully, make backups, and think about redirects to avoid SEO losses.

At the end of the day it is mainly 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 suitable solution paths at hand.

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 you need to take your WordPress media management to the next level.

★★★★★

Rate now!

[{user_coupon}]

{user_discount} Discount

Redeem now!