WordPress: Cannot modify header information - headers already sent (upload image problems)
I’ve been getting the following error in WordPress for the past couple of weeks when trying to upload images in a new post:
The uploaded file could not be moved to /home/xxxxxx/public_html/wp-content/uploads/2007/02.
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/wp-admin/admin-functions.php:1882) in /home/xxxxxx/public_html/wp-includes/functions.php on line 1222
Initially I thought it would be a simple permissions problem on the uploads directory. I checked and it was set to 777 as it should be. I read a few forum posts, tried a couple of “tricks” people had suggested, but still no luck. I then decided to take the plunge and upgrade to the last stable release of WordPress, which turned out to be less of a big deal than I thought it was going to be! However, the first post after the upgrade still gave me a similar error.
I didn’t have too much time to research any further, so I resigned myself to manually upload and link to the images I would use in my posts. A bit of a hassle, but an easy way out for now. For some reason when I went to make a post this morning, I had a brainwave. I’d checked permissions on the main upload directory (uploads), and even the upload year directory (uploads/2007), but I didn’t think to check the upload month directories (uploads/2007/01, uploads/2007/02 etc.) Would you believe they were set at 755 instead of 777? A quick change in my FTP software and now my uploads are working again. Simple I know, and I can’t believe I missed this for all these weeks/months.
Anyway, just thought I’d post in case it helps out anyone else…..
Happy WordPressing!
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!










August 17th, 2007 at 9:43 am
Thank you friend, I was having the exact same problem with my website after upgrading and was starting to think something bad had happened.. just simple permissions. You saved my life! (not really but saved me from FTPing manually lol).
August 18th, 2007 at 5:50 am
Unbelievable! I’ve just had the same problem, changed the permissions on Uploads but didn’t go any deeper… until I read this! Thanks for the info!!
Chris
February 6th, 2008 at 1:20 pm
I moved hosting to a new VPS server and I had the same problem. Apparently the problem is deeper for me, though the above worked.
When they moved my site it had something to do with ASCII/UTF (spelled right?) files during copying.
I’m waiting for my hosting to solve it.
April 3rd, 2008 at 5:22 pm
Thanks - I was having the same problem too, this solved it!
April 9th, 2008 at 12:15 am
This did the trick for me as well. Thanks for the tip!