Error "file is empty" when uploading images in WordPress
Not sure if this was the case (it has been over a year), but in many cases, for this same issue, the problem was due the hard drive being full.
Stupid, I know.
Just check how much space is left, and, if none, go delete logs. Apache, PHP, MySQL. They add up a lot of data when enough time is given.
First I created a file called phpinfo.php and put this in it:
<?php phpinfo();?>
I accessed the page (I'm using wamp) at localhost/phpinfo.php and checked
upload_max_filesize: post_max_size: memory_limit:
I found the location of php.ini and changed these variables upwards to
upload_max_filesize = 100Mpost_max_size = 100Mmemory_limit = 128M
Then I restarted apache and checked that phpinfo.php reflected the new settings. I was still getting the error, so I changed the directory for the site and all sub directories from read-only to read-write. That seemed to do the trick.
I had a similar problem. I receive the "empty file" message and proceed to reload the same file that just report the warning. A lot of messages saying " media xxxx already exists" appears and after check, all the posts have been imported with all the attachments. So basically I had to upload each import file twice but on second time it was faster. Hope it helps.