20

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.

16
  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).

|improve this answer|||||
  • Thanks! That answered my question and that plugin you posted looks absolutely perfect. Unfortunately it hasn't been updated since 2009. I guess I should probably see if there's anything available that's more up-to-date. – jkupczak Sep 30 '11 at 23:14
  • 1
    For anyone else looking at this, the plugin still works on WordPress 3.5. However, it's kind of limited in that you have to manually type in the path (you can't browse for it), you can only upload one file at a time, and you have to go to the plugin to upload, it doesn't override the basic upload functionality. But it's probably still the best file uploading plugin out there. – gsingh2011 Dec 20 '12 at 16:31
  • WP EASY Uploader is not updated anymore. I found custom upload dir plugin – user9 Oct 5 '15 at 19:53
15

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.

|improve this answer|||||
  • 8
    Unfortunately, the date organization structure, which is very useful for blogs, isn't so useful for CMS sites that don't incorporate blogs. Seems like there should be an easy way to create an upload file structure based on things like post type (ie, page uploads go in different folder than CPT uploads). – Ray Gulick Feb 4 '14 at 20:16
  • I'm experiencing the same problem at the moment. Did you ever find a good way of splitting up the folder after moving hosts, or did you just leave the existing 93k files as they are and turn on Organize Media? – patrickzdb Jun 19 '14 at 15:10
  • in the scenario above, you may opt to write a function to incrementally move the files (assuming you have the ability to modify php files within the WordPress install) – ljs.dev Jun 3 '16 at 14:07
5

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-content\uploads" [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!

|improve this answer|||||
2

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.

|improve this answer|||||
1

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.

|improve this answer|||||
-4

Just use http://wordpress.org/extend/plugins/nextgen-gallery/ 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.

|improve this answer|||||
  • 1
    How exactly the plugin applies to the situation asked in the Question? – brasofilo Feb 9 '13 at 20:33
  • Yeah, I don't see how nextgen-gallery does what the OP wants. – Jason Jul 13 '13 at 19:17
  • This doesn't answer the question, it's specific to galleries in NextGen, rather than general media uploads. – random_user_name Aug 7 '13 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.