Can I upload media to a specific folder?

The question:

By default, media uploaded through the WordPress dashboard goes into a folder determined by the current date. For example: /wp-content/uploads/2011/09/. Once the media is uploaded I’m not seeing any options in WordPress to change the location of my file to something else.

Can I tell WordPress to place my media in a separate folder? Not all my media. Just ones that I specifically select.

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

  1. Go to Dashboard -> Settings -> Media
  2. Enter the desired location in Store uploads in this folder
  3. Uncheck Organize my uploads into month- and year-based folders

This will specify the global upload location. To specify a per-file upload location, you’ll need to use a Plugin, such as WP Easy Uploader (not an endorsement, per se; it was just the first one I found).

Method 2

I would advise against un-ticking ‘Organize Media’ unless in a situation where you are handling storage elsewhere.

Having a large amount of files in one directory is flawed for many reasons, though there is some situations where this is unavoidable but for a website this is always unavoidable.

I inherited a WordPress website and was tasked with moving it to another host. This proved to be a problem since all uploads were in one folder, over 93,000 files – yes 93 thousand.

No FTP client was able to index that many files and simply would not navigate into the folder.

I had no shell access to the system.

I couldn’t do a full dump using the hosting control panel as there was no option to do so.

I had to rely on the hosting company to do a dump for me, which was a task in itself tying to get them to do it.

Apart from these potential issues, indexing thousands of files is slower than indexing tens or hundreds of files – simply, performance is effected with large amounts of files in one directory.

Method 3

Another solution to this problem:

  1. Go to Dashboard → Settings → Media and uncheck “Organize my uploads into month- and year-based folders”. So now every file you upload will be placed in “wp-contentuploads” [optional step, but recomended to find easily new uploads for moving to another folder].
  2. Install “Media File Manager” plugin.
  3. Go to Dashboard → Media → Media File Manager.

Here you can create all folders you wish to organize your contents. The two divided window is just for moving content between different folders, you create a folder in one side and it’ll be refreshed in both. Use two sides to navigate to current and destiny folders of your content, then use left or right arrow to move it, it’s easy!

Notice DB is updated also, so if for example you move an image you’re currently using elsewhere in your web, you’ll have to reselect this image from Media Library or it won’t appear in your web.

Hope you’ll find this info useful. Regards!

Method 4

A ‘quick hack’ solution for the occasional situation where you want to upload a media file to the directory for a particular year/month in the past:

  • add a temporary draft post (don’t save)
  • change the publishing date to the year and month you want and [Save Draft]
  • [Add Media] in that post – WordPress will save it to the folder for that year/month.
  • go back to Posts and delete the draft post.

As long as you didn’t publish it, the post will never appear on your site, or in feeds etc. but the media file will be left in that directory.

I appreciate that this is for a very specific case of the question above, but it helped me, when adding to a set of downloads that needed to be kept together. No good if you actually wanted them outside the chronological tree.

Method 5

This is what you are looking for:
Media Library Plus

I used it and it did the trick.
Here is the guide on how to use it.

Method 6

Use this ‘FileBird’ free plugin, and you will see how to upload files to a specific folder like this the image below.
Can I upload media to a specific folder?

Method 7

Just use Nextgen Gallery. You can upload groups of images there, use it to display galleries, or upload a single image from there in the WP image insert window.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment