Title: wp_handle_upload always returns empty
Last modified: August 20, 2016

---

# wp_handle_upload always returns empty

 *  [bigskinny](https://wordpress.org/support/users/bigskinny/)
 * (@bigskinny)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/wp_handle_upload-always-returns-empty/)
 * I’m trying to set up a file upload in a plugin, but for some reason, wp_handle_upload
   always returns the following error:
 * > 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
   > defined as smaller than upload_max_filesize in php.ini.
 * I checked post_max_size and upload_max_filesize and they are both set to 64M,
   much bigger than the files I’m trying to upload.
 * Here is the code I’m using to handle the upload:
 *     ```
       $newpath = 'uploads';
       update_option('upload_path',$newpath);
       $overrides = array( 'test_form' => false);
       $cpnfile = wp_handle_upload($_FILES['cpnfile'], $overrides);
       print_r($cpnfile);
       ```
   
 * Any help would be much appreciated, thanks!

Viewing 1 replies (of 1 total)

 *  [vonshavingcream](https://wordpress.org/support/users/vonshavingcream/)
 * (@vonshavingcream)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/wp_handle_upload-always-returns-empty/#post-2932799)
 * Were you ever able to resolve this? I am getting the same errors.
 * Thanks,

Viewing 1 replies (of 1 total)

The topic ‘wp_handle_upload always returns empty’ is closed to new replies.

## Tags

 * [wp_handle_upload](https://wordpress.org/support/topic-tag/wp_handle_upload/)

 * 1 reply
 * 2 participants
 * Last reply from: [vonshavingcream](https://wordpress.org/support/users/vonshavingcream/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/wp_handle_upload-always-returns-empty/#post-2932799)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
