The Wordpress upload directory. [Read more about `wp_upload_dir()` here](http://codex.wordpress.org/Function_Reference/wp_upload_dir).

learn more… | top users | synonyms

1
vote
2answers
14 views

Change WordPress' media upload URL?

This isn't the usual "How do I change the media upload folder?" question. Our entire site is run through a CDN. The CDN drops POST requests with a 5-6MB file so the WordPress uploads fail. I can work ...
1
vote
1answer
549 views

Organizing uploaded media with wp_insert_post() and wp_handle_upload according to time parameter

I'm retroactively creating a post with wp_insert_post() and attaching a featuring image to it. I need the image to go into the folder that corresponds to the post's publishing date. I'm using time ...
0
votes
1answer
4k views

Organize media uploads in folders - I have a physical access to (my) server

I'm very new to Wordpress. With the help of my friend I installed Wordpress on my server and finally we have our web online. However, I would like to upload some content in media library but I need to ...
0
votes
2answers
47 views

Change upload_dir folder at a certain cpt but cant change back

im try something with the upload_dir filter I check the current CPT with this function function get_current_post_type() { global $post, $typenow, $current_screen; //we have a post so ...
0
votes
4answers
2k views

Missing a temporary folder despite settings in wp-config.php

When trying to upload media to my Wordpress 4.0 running on a shared Apache 2.2.14, PHP 5.3.2 host, I get the error message "Missing a temporary folder". I have no influence over the php.ini which is ...
0
votes
1answer
677 views

Upload folder is not writable, even when permissions are correct

I recent migrated my site from Godaddy to Webfaction. On migration, I get this error: Upload folder is not writable. Export and file upload features will not be functional. Naturally, I check ...
0
votes
1answer
23 views

Customize WordPress Upload Directory

I'm trying upload certain files to the following custom director: /wp-content/uploads/audio/yyyy/mm However, the year and month directories are not being created properly. They are showing up like ...
0
votes
0answers
65 views

File path for attachments outside of wp-content/uploads

I am creating some custom post creation pages with PHP. I create a simple post and want to attach an image I already have on my server to the post without moving it into the upload directory. I am ...
1
vote
1answer
53 views

What are best practices to storing uploads in Wordpress?

We've been storing all of our images using the default /year/month/day, but I'm thinking there has to be a better way to store things because everytime that I update a image or pdf. I have to reupload ...
5
votes
1answer
242 views

Custom “Uploads” Dir: “Edit Image” in Media Library broken

Directory Structure I have customized my (local) install (dev box). The current directory structure is: ./root |- wp (WordPress Core root) \ |- wp-config.php |- wp-content (Content and ...
2
votes
1answer
30 views

Organizing media uploads

One of my clients wants to transfer his WordPress website to my server. The problem is his website doesn't use sub-folders in his upload folder, and he has more than 1,000,000 files in the root of his ...
3
votes
1answer
897 views

Organize uploads by year, month and day

As of now my uploaded files are organized by year and month. But I would like to organize them by year, month and day. I mean like this 2012/10/30/image goes here PS: There is a plugin available to ...
0
votes
0answers
18 views

using the filter 'upload_dir' on OpenShift

I want to override the /year/month scheme and upload my files to a specific folder. I've copied the following code form codex.wordpress and inserted in my theme functions.php: ...
1
vote
1answer
43 views

Standard location for plugin to save/cache files?

Are there official guidelines on where a plugin should cache files? If not, is there a best-practice out there that I can follow? For example, a plugin grabs content from a back-end system ...
0
votes
1answer
31 views

Impossible to index an upload folder with 10k files

I have a WP installation which has a very large uploads folder with a bit more than 10k files. At the time we unset year/month folder organization and now we have huge problems to download or backup ...
0
votes
0answers
27 views

Custom upload option get an error. (WordPress)

I have successfully created front-end upload option for the users. By following this tutorial. But, When I upload the images it's getting an error. I had enough to goggling now. Below is my codes, ...
0
votes
1answer
42 views

Post Type Upload Directory - {post_type}_upload_dir filter

I'm working with modifying the upload directory depending on which post type is being uploaded to. I've ran across this question: Post type specific upload folder in 3.5 and one of the lines confused ...
1
vote
1answer
57 views

Change wp-content/uploads to uploads/%postname%/%image%

When uploading an image to a post, I want to change it so that it grabs the postname or post_id and places it in a folder like uploads/%postname%/ Is there a simple method of doing so? thanks
-1
votes
1answer
41 views

Use a filter from a class function?

How can i use add_filter within a class function? this doesn't seem to work class ClassA { .... function my_custom_upload_dir($dir) { return array( 'path' => ...
3
votes
2answers
1k views

Set custom upload path for custom post type only?

I have a custom post type of 'clients' and would like all images/files uploaded through the admin for these posts to go to a specific directory on my server, but everything else to stay as normal. Is ...
0
votes
1answer
123 views

Wordpress File URL Path Incorrect

I have images uploaded to a Wordpress site and they can be accessed by the following URL: http:/eatdrink.ca/content/uploads/2014/09/FoodWebSummer-main-420x194.jpg but Wordpress is giving the ...
0
votes
0answers
903 views

File(X) is not within the allowed path(s):

I installed wordpress on a windows server with Parellels. It is a shared hosting. When i upload images it gives the following warning: Warning: file_exists() [function.file-exists]: open_basedir ...
0
votes
0answers
202 views

Is there any way to Integrate WordPress with Imgur for Image Hosting

I wanted to use Imgur for hosting all my WordPress website images. Till now I know how to integrate Imgur with a simple form using an upload script. The process is well explained at Subin's Now what I ...
0
votes
1answer
62 views

Uploaded files have permission 000

two days ago i updated wp to the newest version and this problem occurs since then. when i upload files to the media library, their file permissions are set to 000. means no rights. the files are ...
0
votes
0answers
51 views

Upload media to WordPress through a web service

I would like to create a plugin through which I could expose a web-service for the media in WordPress. This service would allow external applications to upload and delete medias. Of course, the user ...
2
votes
0answers
457 views

How to get WordPress to save upload file beyond web root

I am using nginx on a multisite install. I am trying to get WordPress to save uploads to a folder beyond the webroot : /home/mydomain/file_secure as opposed to ...
1
vote
1answer
823 views

wp_handle_upload() - how to upload to a custom subdirectory within uploads

wp_handle_upload() works for me, but uploads files where it wants (uploads/year/month). Question: Is there any way to tell it to upload files to a custom dir (uploads/mycustomdir)? Or is there some ...
0
votes
0answers
170 views

Missing Images in Uploads Directory (Server Only)

I recently moved a WP install from our dev server to the clients server. Everything went fine, however, the site is missing a large amount of images. The dev site has the images in the Wordpress ...
0
votes
1answer
75 views

Primary site file uploads failing, subdirectory subsites upload fine

Pardon the cross-posting (also up at Wordpress.org): We're tearing our hair out here. We have multisite configuration working, subdirectory style. File uploads work to the subsites, but the primary ...
1
vote
1answer
3k views

Proper way to change the path of uploads folder for existing WordPress site

Until now I have used default WordPress directory structure, however since I started using GIT, I plan to setup WordPress as a submodule and also change the paths of upload folder. Since the path for ...
4
votes
4answers
888 views

Each custom image size in custom upload directory?

I want to upload my custom image sizes in custom folders. The folder should have the name of the selected width. For example: If I add these custom sizes... add_image_size('custom-1', 300, 9999); ...
0
votes
2answers
243 views

Undoing define( 'UPLOADS', ''.'files' ); to repoint to “wp-content/uploads” folder

Is it possible that by setting the “wp-content/uploads” to use a different folder by using define( 'UPLOADS', ''.'files' ); I have effectively changed all the paths on a permanent basis and if that is ...
0
votes
2answers
50 views

Upload Directory question

Happy New year! So I am having a big of a problem, currently one of our php files that we bought points to the default uploads directory for wordpress and we would like to change this to our own ...
0
votes
2answers
959 views

Moving existing media items to new upload path structure not updating full URL path

Have been developing a site and noticed that all of the media files were being saved in the default WP year/month/day rule in the wp-content/uploads directory. I decided to change this to assets and ...
1
vote
3answers
6k views

How to change the file upload directory on version 3.5?

The option to change the upload folder for images is gone on version 3.5, any way to make it visible again or a workaround ? From this core ticket: Changing the upload_path and upload_url_path ...
1
vote
1answer
211 views

upload files dynamically to user folders

we have several users on our site. we have created a separate folder for each user. Admin have a select box to select users on the site. we have to give ability to upload files to that particular user ...
0
votes
1answer
1k views

using wp_insert_attachment() results in guids with file names different to the same file when uploaded via media page in admin

I'm trying to make a plugin that as part of its task uploads csv files to the wordpress install. Deciding to integrate as closely as possible using wordpress functions wherever possible I am saving ...
0
votes
1answer
813 views

Upload an image at frontend > Create direction and/or rename filename possible?

I have a form for a non-profit-club, that publish posts + up to 20 images. The image-path will be writen in a custom-field. Images are uploaded. Ok, now i want to rename the pictures or (much better) ...
4
votes
2answers
5k views

Wordpress Uploads Folder can't be Written to

This one has me stumped I'm sure it is something really small that I am overlooking but I think I've been looking at it too long to see what the problem is. Wordpress is telling me: "Upload ...
0
votes
1answer
313 views

Separate Uploads folder on other server

Is there a way to separate wp-content/uploads on different server ? I mean if i have two servers. Serv1 and Serv2 . On Serv1 is the wordpress installation and on Serv2 stays only the uploads folder. I ...
2
votes
3answers
4k views

How to set featured image to custom post from outside programmatically

I am trying to fetch and insert images outside the wordpress environment to a custom post via PHP. How to move/upload that image to wordpress upload directory year date folder format just like ...
0
votes
2answers
214 views

Inserting image into post content - Front End

This is the php I have for a form which creates a post with thumbnail. I want to know how to add the uploaded image to the post content as well. Tried a few things, but they didn't work. ...
2
votes
3answers
1k views

Using wp-uploads instead of wp-content/uploads

What is the difference between the wp-uploads directory and the wp-content/uploads directory? I am running Ubuntu Server 12.04 and recently installed WordPress using apt-get, but there have been a ...
1
vote
2answers
55 views

Wordpress uploads folder path. how it is decided?

I know that if we are adding a new media in the month of August, it will be uploaded to /08 folder under /uploads. But here i am facing a new issue. I wrote a page in the month of June(6th month). ...
0
votes
1answer
809 views

Media Library not showing images when adding to Posts (but retrieving image info via ajax)

When uploading an image to a post/page, the media library doesn't display any images (when there are some), and then 'fails' when you try and upload (although the image is actually uploaded). I've ...
0
votes
0answers
368 views

Symbolic link for uploads in wordpress

Hi i am a new bie in wordpress. i use load balancer for my sites. So the request can be processed by any of the 4 servers. so i moved all contents from /wp-content/uploads to the centralised server ...
6
votes
4answers
25k views

Can I upload media to a specific folder?

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 ...
1
vote
3answers
3k views

Cannot upload anything via wordpress

I've just recently installed a local installation of Wordpress 3.5.2 on my laptop, running ubuntu 12.10. I installed following the guide from here. So far, everything else is working, except I cannot ...
1
vote
1answer
291 views

Force Uploads Use Yearmonth to off (0) for all existing sites in Multisites

In WordPress Multisite, by default the site option Uploads Use Yearmonth Folders is on (set to 1). Is it possible to force this value for all existing sites in the Network? Perhaps a hook? I know ...
0
votes
0answers
86 views

Limit files uploaded per folder

I upload over thousands of images everyday and I want to limit the number of files that can be stored in a folder cause it's not good to have like 5000 files in a folder because it increases the load ...