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

10
votes
2answers
590 views

Get upload URL by blog ID in multisite

The essence of the question is, I'm looking for a solution like this: $blog_upload_dir_info = wp_upload_dir( $date, $blog_ID ); $blog_upload_url = $blog_upload_dir_info[ 'baseurl' ]; Where ...
0
votes
2answers
294 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
1answer
52 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 ...
2
votes
1answer
79 views

Images in upload folder with hexadecimal names

I'm using Wordpress 3.4.1 with the Suffusion theme 4.3.0. I've noticed that there are a large number of images with hexadecimal names, like 54f96e1d5f478186f66bde9d6aeda625.jpeg. I'm wondering how ...
1
vote
1answer
166 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 ...
1
vote
1answer
104 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
vote
1answer
713 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
35 views

Unable to Upload Files

So, I have Wordpress installed on a GoDaddy server, and I am getting an error saying: Unable to create directory uploads/2016/03. Is its parent directory writable by the server? The folder ...
0
votes
1answer
12 views

How to stop a post from publishing if the file upload is not a image/gif

This is the code and i want to stop the post publishing if the file is not an image Is this possible ? case "window-image": $format = 'image'; $title = ...
0
votes
1answer
112 views

Too slow Image upload in Wordpress Media Library as image number increases

we are using Wordpress 4.4.2 and the Wordpress Media Library for media management. We have noticed that as media (images, not videos or audio) number increases, the upload process takes too long...and ...
0
votes
1answer
27 views

cant able to upload media to my wordpress blog

i am trying to upload an image for a post in my WordPress blog but it is giving error: “image.gif” has failed to upload. Unable to create directory uploads/2016/02. Is its parent directory ...
0
votes
1answer
34 views

Renaming “Expand Details” within “Add Media”

I was wondering if it was possible that the "Expand Details" option via "Add Media" can be renamed? I couldn't find a guide online so I thought I would ask here for guidance, (that's if it's ...
0
votes
1answer
23 views

Error while uploading photos

The photos I am trying to upload to my site are either in JPG or PNG but every time I try to upload them it says, Error try again later. Why is this happening and how can I fix it?
0
votes
1answer
143 views

Media Library doesn't allow uploads? Upload Directory

I just put up a WP 4.31 site. Most of the content was copied from a different WP site via FTP. All the stuff in wp-content: uploads, plugins,themes, etc. It all seemed to work as usual, and I've ...
0
votes
1answer
40 views

How to create an uploads subfolder on a multisite setup?

I have a plugin which will create a folder inside wp-content/uploads, using this code: //Generate stuff on plugin activation function sample_plugin_activate() { $upload_dir = wp_upload_dir(); ...
0
votes
1answer
60 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
1answer
363 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
1answer
87 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 ...
0
votes
1answer
43 views

Is it possible to set the upload location to a different server?

Our university has given our student society a 1GB portion of storage to be used for our website. We're low on their bandwidth priority however so it did not work speedily with Wordpress. I managed ...
2
votes
0answers
860 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
0answers
155 views

custom upload directory only for plugin uploads

i'm trying to add an upload_dir filter only for plugin-uploads. does anybody know why the code below doesn't work, and what could work instead? thanks in advance! $upload_dir = 'publications'; ...
1
vote
0answers
482 views

Upload video in custom folder

I am trying to find a system to upload some kind of media in a custom folder. I want to keep all uploads in default wordpress folder and create a custom folder just for videos. So i would have the ...
0
votes
0answers
56 views

Make Wordpress upload directory outside wordpress root with custom url

I want to change the upload directory for Wordpress from project.dev/wp-content/uploads to cdn.project.dev Where subdomain cdn has DocumentRoot: HostPath/project.dev/cdn while Wordpress is located at ...
0
votes
0answers
12 views

How to limit the access of each user just to his own uploaded files Amazon S3?

In my Wordpress website Users can upload video files directly to the Amazon S3 bucket from the front-end, how to limit the access of each user just to his own uploaded files and not the other users ...
0
votes
0answers
24 views

Custom Upload Directory for Custom Post Types

I have almost 64 different custom post type. Now I want to set custom media upload directory to them. I have 8array that contains 8custom post type each. For example: array1 = ...
0
votes
0answers
64 views

Custom upload folder

I have custom post type and I would like that when admin/user uploads images (for example featured image) to this custom post type, the image would be uploaded to custom folder. As default they go ...
0
votes
0answers
195 views

403 Forbidden when accessing image in wordpress

I am getting 403 Fobidden error when trying to access directly from URL. Here is my blog page url : http://www.modestmoney.com/peer-lending-returns-still-sizzling/ Images are displaying in post ...
0
votes
0answers
69 views

Custom upload directory for each file only for current plugin

I have a custom plugin to add project documents in my Wordpress site. Now these documents should be stored in their respective project folder such as: EN001/Document1.pdf EN001/Document2.pdf ...
0
votes
0answers
38 views

change upload dir

Currently my images are like www.example.com/wp-content/uploads/2015/06/xxxxxx-yyyy-zzzz-photo-no.jpg I want this like www.example.com/wp-content/uploads/xxxxxx/xxxxxx-yyyy-zzzz-photo-no.jpg or ...
0
votes
0answers
279 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 ...
0
votes
0answers
613 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
0answers
1k 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
280 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
0answers
700 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 ...
0
votes
0answers
117 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 ...