Articles of uploads

OSX El Capitan local install Maximum upload file size: 2 MB But php.ini set to 64M

Brand new site. Not MU. No matter what I do, I cannot get a file uploaded that exceeds 2MB. I’m running a localhost server with WordPress 4.3.1 I’ve modified both relevant settings in the the site’s php.ini as: upload_max_filesize = 64M post_max_size = 64M However, I’m still getting the message when trying to upload a […]

Insert an image into uploads folder from external folder in wordpress

I have to migrate a php website into wordpress and i am transferring tables details into wp_posts. When i am inserting images to post from external folder shows error as File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being […]

Copy wp_posts entry for a shortcut to a file in media library

Introduction In the above screenshot you can see the plugin Real Media Library which makes a folder structure to the media library. I want to extend the plugin, so that a file can be linked/copied to a folder with a simple “hold key”, (the actions and filters are given and JavaScript is written). Btw.: A […]

“Could not write file” error in wp_upload_bits function

I’m trying to scrape images from the web and upload the binary files by using wp_upload_bits ( This works fine for about 95% of the images, but some images can’t be uploaded. I’m getting the following error: Could not write file %s. The full code for this error in the function is: $ifp = @ […]

“send_to_editor” function returning pdf file name

I’m using the Media Uploader to select a file url for a custom post type. I’m expecting the html parameter for send_to_editor to be a string html tag that includes the file url as the src or href. This works for most file types but not for pdf files. For pdfs, the parameter is simply […]

How do I enable the text editer in my WordPress theme?

My text editor seems to be broken. I can reproduce this issue on cPanel. I clean-installed everything 2-3x and this issue still persists. I wasn’t able to reproduce it on Managed WordPress. I am using the latest version of WordPress and OnePress (theme). Steps 1. Install and activate OnePress demo theme in WordPress 2. Go […]

wp_enqueue_media(); in multiple widgets

I have this code which works perfectly if you use a single widget. However if you create another widget the uploader will overwrite both widgets settings. Does anyone know how this script can be modified to allow it to be used multiple times? HTML <p> <label for=”<?php echo $this->get_field_name( ‘image_url’ ); ?>”><?php _e( ‘Category Image:’, […]

uploaded an image by wp_insert_attachment but its thumbnail isn't coming up on Media Library

I’ve uploaded an image using wp_insert_attachment in order to upload the image to a custom field. The image is attached to the custom field successfully, the data on DB is correct, all seems working fine except its thumbnail image isn’t showing up on Media Library. It isn’t a major problem,but I’m having a hard time […]

Error uploading images in wordpress

I just installed a fresh wordpress installation on my client’s server and tried to upload an image, but it is not getting uploaded. Gives me the following error: Unable to create directory wp-content/uploads/2017/01. Is its parent directory writable by the server? Can someone guide me how to fix this error?

Make WordPress import attachment title from XMP “Title” attribute

I’ve got set of images with EXIF, XMP and without IPTC data. While importing into media library, attachment’s title is being imported as “Image Description” EXIF attribute or “Description” XMP attribute (they’re the same). I would like to make WordPress import “Title” XMP (EXIF has no title attribute) attribute into the title field and “Description” […]