Articles of upload dir

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). However, when WordPress is first created, there’s no uploads folder. If you manually go to the media section and upload something, it will […]

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 the time it takes is about the same for both ie 50 kB and 6 MB images! It is not a network problem, […]

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 them to appear in the WP media panel. We have found this useful snippet which allows us to […]

Use wp_upload_dir() correctly

All, I’m using the Uploadify plugin to upload some images. I’ve included the uploadify folder in my themes folder. However, when I try and call uploadify.php I get the following error: Call to undefined function wp_upload_dir() My code looks like this: global $cssPath, $jsPath, $themePath, $theLayout; $upload_dir = wp_upload_dir(); echo $upload_dir[‘path’]; Any idea how I […]

uploaded images not going to /uploads folder

having a huge problem with a site. i updated the theme to use post thumbnails (that’s how old it is) and then when trying to upload an image to use as featured thumbnail: the images process/crunch but then the URLs result in 404s. there isn’t anything abnormal in the site’s .htaccess. there actually wasn’t a […]

Setting image upload absolute path?

In anticipation of a major upgrade, I moved the webroot from site_v1 to site_v2. The public url for the WP 3.3.1 install is still (no change). I did a tar copy from the /site_v1 dir to the new /site_v2 dir. The WP installation is working well from its new Linux path of /site_v2 instead […]

Are uploads directories created on a schedule?

I have a cron job that alerts me to modified files on a couple of WordPress installs. Two of them alerted me tonight to the creation of apparently empty folders like /home/foo/public_html/wp-content/uploads/2013/05 Is there a scheduled job in WordPress to create the next month’s upload directory on the last day of a month?

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 = ( $upload_dir[‘baseurl’] . ‘/logos/’ ); echo $logo_dir . ‘—–<br />’; $images = glob( $logo_dir . “*.PNG” ); foreach( $images as $image ) { echo $image; } […]

Is it possible for a plugin to force reading and writing of uploaded images to a database instead of to a filesystem?

I am trying to configure a WordPress site using a server cluster and independent file systems. The problem is keeping the wp_content/uploads folder synchronized across all the server instances. My preferred solution is to “write” and “read” these files to/from a shared database. So my basic question is whether this is possible to code in […]

Location of image metadata on my server

To clean up my media library, I deleted some unused pictures directly out of my uploads folder. Now, whenever I go to the media library the file names are still there but the thumbnails have been deleted: Where is the image metadata stored on my server so that I can delete it there.