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

0
votes
2answers
6k 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 ...
-2
votes
1answer
14 views

make default upload folder year/month/day wordpress without plugin

is there any way to change in code and make it when you click(enable) “Organize my uploads into month- and year-based folders. ” it to be default year/month/day ……… without any plugin.. Can anyone ...
0
votes
0answers
21 views

Wordpress Multisite subdomains and sharing the same upload folder

Hello, We wonder if you can help resolve two doubts about Wordpress structure. We are developing a multisite in 3 languages and would like to know about these 2 things: 1. Is it possible to develop ...
5
votes
3answers
7k 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 ...
10
votes
2answers
643 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 $...
1
vote
2answers
56 views

How to upload image from front end and save in media library?

I am working on a plugin .I want to upload image from front end i.e by input type="file".I did lot of google for it but could not upload image .Here is my code for uploading image <form method="...
1
vote
1answer
722 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 ...
3
votes
1answer
61 views

How to upload an image in the plugin's options page

My code is here.The other options working perfectly so how i can register the image and save the link in database and image in wp library. function register_team_show_case_setting() { //register ...
0
votes
0answers
650 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
2answers
20 views

How to get images to show in Media when saved Via PHP

I saved a bunch pictures ( 2,000+ ) in a PHP script. I can see the list of files with adequate permissions for apache to view them in my /wp-content/2016/05 directory but They aren't showing up in my ...
0
votes
1answer
17 views

How to adapt upload_dir to save files outside of WP uploads folder

We have a CPT which is used to manage various assets including image, pdf, CAD and other files. Our client would like to keep these asset files seperate from their other media files and does NOT want ...
1
vote
1answer
77 views

Get User's Facebook Photos as Wordpress Upload

I am new and a bit of troublesome on how Wordpress work as I have plan to use it as CMS for my commercial website. I have been figuring out on how to make an image that I have retrieved from user's ...
0
votes
1answer
109 views

Change WordPress upload path and URL

On a fresh install, I want to move the upload folder to a subdomain (supposed to speed up download). My subdomain links to a folder called static. So I have: Home wp wp-admin wp-content wp-...
0
votes
1answer
41 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 = esc_html($_POST['title_image'])...
4
votes
2answers
2k views

Different upload directory based on post type in a theme

I have a lot of uploaded image files and image sizes. So it would be better to organize media files into folders based on post type. I have just read this tutorial, but as I can see it works with ...
0
votes
1answer
126 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
0answers
64 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
1answer
35 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 possible)....
1
vote
1answer
113 views

List and show uploaded pdf files dynamically

I want to show all the PDFs for a specific WordPress page. I exactly want that the PDF documents will upload from the admin panel and I want to show all the PDFs in a page in the front-end dynamically....
5
votes
3answers
191 views

Why my uploaded picture was loaded into /uploads/2015/02 not /uploads/2016/01?

Today is 2016-01-01 in my console. date Fri Jan 1 14:24:04 CST 2016 Now I write an article attached a photo which is taken today and publish it today. I found that the URL of the photo was ...
4
votes
2answers
1k 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 ...
2
votes
1answer
3k 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 ...
4
votes
2answers
53 views

Custom upload directory per CPT; when removed, file not deleted

I have this code in functions.php that organize media upload according to its Custom Post Type (CPT). So all images uploaded to a "Product" CPT will be inside wp-content/uploads/product directory. ...
7
votes
1answer
671 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 ...
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
1answer
32 views

How programatically cause uploads folder to be created?

My plugin uses the uploads folder to store some files for configuration (as that folder is writable on all installs and I've had issues with Wordpress deleting files elsewhere on some installations). ...
0
votes
0answers
25 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 = array('type1','type2','...
0
votes
1answer
123 views

Get all images in uploads directory and list them

I'm trying to get all of the images inside a specific sub-directory within the WordPress uploads directory, and then output all of those images. $upload_dir = wp_upload_dir(); $logo_dir = ( $...
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
0answers
65 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 wp-...
0
votes
0answers
216 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
1answer
150 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 ...
6
votes
3answers
492 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 ...
1
vote
1answer
7k 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 ...
0
votes
0answers
70 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 EN001/...
0
votes
1answer
41 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
2answers
115 views

New wordpress uploads are broken

I have been running a network of WordPress sites (Multisite) since version 3.8.1. I've been constantly updating plugins and core. At some point, I discovered that uploading new images yields broken ...
0
votes
0answers
39 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 ...
2
votes
2answers
292 views

Change upload directory on custom plugin page

I am trying to change the path to my uploads directory when on this one specific page in my custom plugin. The page is a standard php page and not any specific type of post type page. I have found ...
0
votes
1answer
2k 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
2answers
1k 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 ...
11
votes
4answers
40k 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 ...
5
votes
1answer
216 views

How are the year and month folders added to the uploads directory?

How are the month (and year) folders automatically added to the uploads directory? The plugin that I am writing keeps track of the folders in uploads and I want to be able to add the new folder(s) ...
1
vote
2answers
882 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 ...
0
votes
2answers
516 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
10k 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
62 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
292 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 ...