
The new Wordpress 2.5 is great, especially it’s new approached used to handle images upload. However some Wordpress users might encounter problems uploading images, getting stucked with error messages similar to the following:
- HTTP error
- An error occurred in the upload. Please try again later.
If you fail to upload images with the error messages above, here’s a fix for it. Prepare your favorite text editor, FTP program (or shell terminal) and following these following steps:
Step 1
Using FTP, or shell terminal navigate to the root of your WP folders. Download .htaccess and open it with text editor. If there isnt any .htaccess file, create one.

Step 2
Insert the following script into .htaccess.
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
If there’s existing script inside your .htaccess, just put the code above below it.

Step 3
Save, and upload to replace your current .htaccess. Go to Wordpress admin, you should be able to upload your image now.
Don't miss any post. Subscribe to Hongkiat's RSS feed now.













Comments
eL April 3rd, 2008
Weird i do not have this problem with uploading image. but i wish to have multiple image upload rather than just one by one upload. Thanks for sharing this tips!
ReplyAl April 4th, 2008
Thanks very much for putting it in such an easy, simple to follow way with pictures for the terminally stupid like me. It was a big help.
ReplyDavid April 4th, 2008
Good guide although this fix doesn’t seem to work for every configuration - I found another guide which did the trick for me - http://nineteenhundredandyesterday.com/?p=103
ReplyChris April 4th, 2008
You’re a LIFESAVER. This problem has been bugging me since I tried out the first RC of WP 2.5 and was actually the reason I downgraded to 2.3.3 again. I mean, what’s the point of an image gallery if you can’t upload?
Thanks a LOT! :)
ReplyKay April 4th, 2008
what’s the reason behind this error?
ReplyNoddegamra April 4th, 2008
Thanks for this fix! It was so frustrating.
ReplyOlly Newport April 6th, 2008
THANK YOU for this, I was wondering what the heck was going on.
ReplyPiroman April 7th, 2008
Thanx, it helped, though only for Mozilla Firefox.
ReplyBlogBucks [dot] net April 7th, 2008
Thank you for this guide. I experienced this problem and because of your help, everything is now ok .Thanks again.
ReplyBlogBucks [dot] net April 7th, 2008
Ouch. I got a problem after entering that script. Every link in my blog is error.. PLease help :D
ReplyBlogBucks [dot] net April 7th, 2008
Ow. I already fixed it.. sorry for over commenting.. i’m not a spammer.. :D i’m just in panic :D
ReplyErnesto April 8th, 2008
Thanks for the fix. :-)
Replydon April 8th, 2008
Thank you mate.. i got image uploading problem but now it solves after i found your tip.
ReplyGreg April 9th, 2008
Thank you!!!!!!!!
ReplyLangChiaPek April 9th, 2008
Thanks for the tip, it helped
ReplyPashalex April 10th, 2008
I am trying to install a new theme in word press 2.0 but any theme i chose it comes up with an error “Broken Theme” and “style.css is unreadable”.
ReplyAny comments much appreciated.
kita April 10th, 2008
i cant activated plugin..fatal error..how i can do it ?
ReplyJR April 12th, 2008
I tried this and it did not work until I upgraded my “Bad Behavior” plug in. Now images upload without a problem.
ReplyWilliam April 13th, 2008
Thanks for the fix, this has been a major pain to try to deal with.
ReplySteve April 13th, 2008
This method does not work for me. I am working with an upgrade. But that seemed to go smoothly overall. How could this glaring problem exist?
I think I did this correctly, but it still fails. Would someone be willing to see if I have the .htaccess code correct, if I were to send it? I am adding the revised code using Notepad ++
Steve
Replymarcelo cannobbio April 14th, 2008
Thank you! works perfect.
I’m on a hostgator reseller server, running wp2.5
;)
Replyallenooi April 15th, 2008
it fixed my problem! hongkiat.com rocks!! Thanks!
Replynel April 15th, 2008
you are the best!
ReplyVisi April 15th, 2008
Yo MAN !!this fix rulezzz:D:D:D: 10x a lot
ReplyLukatoll April 15th, 2008
hey does anyone know whats wrong with mine? whenever i try to upload it always say specified file failed upload. Ive tried everything from resizing to changing the format.
ReplyAny help would be appreciated.
Thanks!
Knocksense April 15th, 2008
Thanks for the tip. Very helpful!
ReplyGarden Pixie April 19th, 2008
Thank you so much for this fix. I just got my blog up and running today and when I tried to upload my pictures, I got this same error message and my heart sank. Your fix worked like a charm and now things are running smoothly. Thanks again. :)
ReplyMike April 23rd, 2008
Thanks for the fix - this worked really well in under 3 minutes!!!
Replymandy April 24th, 2008
When I upload a picture it only fills in the picture name in the BOX; but not the picture URL.
I’ve tried the above but it seems the uploader is not picking up Picture URL.
Any ideas what this might be?
mandy
Replyscamboy April 26th, 2008
Got it fix now….
Thanks man…
ReplyNizmoe April 27th, 2008
This was a huge help, thanks!
ReplyHardik (Mobile Tech Blog) April 29th, 2008
Thanks a ton.. worked for me
ReplyJammers April 30th, 2008
Does not work for me.
ReplySteve May 2nd, 2008
Thanks so much for this. It’s been a frustrating night!
ReplyRob May 2nd, 2008
Super frustrating! Thank you.
Replyexi May 3rd, 2008
THANK YOU :)
ReplyRocky May 5th, 2008
This trick worked for me, thanks.
ReplyDarren May 6th, 2008
Great tips, worked a treat. Thanks very much!
ReplySeba May 6th, 2008
It works! Easy and simple tip to solve a big problem. Thanks :)
ReplyRDude May 9th, 2008
This didn’t work at all. I followed all the instructions too. Thanks anyway though. I appreciate the effort. WP 2.5 is just nothing but problems if you ask me. I was quite happy 2.3.1 to be honest. At least I could upload a simple picture for crying out loud. My 2.5 blogs didn’t even have an .htaccess file. I had to create one for all them. How messed up is that?
Again…thanks for your efforts.
Replysveden May 9th, 2008
Worked like a charm! Thanks a lot.
ReplyRobert W May 11th, 2008
Yay, it worked! Thanks!
ReplySukosaki May 12th, 2008
Worked perfectly! Good work!
ReplyChris May 13th, 2008
Brilliant! I was banging my head on the desk over this one. Now working fine. Thanks.
Reply1Earth May 14th, 2008
I spent 3 days trying combinations of plug-ins to try and solve this problem as it doesn’t work on my main blog, but a blog hosted in a sub-domain does.
Thanks for the 1-2-3 steps, exceptionally done. What a relief!
ReplyBburman May 14th, 2008
Ok, I did this and now I get the following error:
The precondition on the request for the URL evaluated to false
ReplyHenry May 14th, 2008
I used the fix and it word when I went back to my .htaccess file the inserted text you created was gone. I have done this multiple times and it will not save in the .htaccess file. It is weird. I put your text in save it go back to wordpress and it lets me upload. BUt when i go back to the .htaccess file your text is gone. Any ideas??
ReplyBilly May 18th, 2008
Worked for me. Thanks.
ReplySolomonc May 18th, 2008
Your solution work brilliantly for me as I am also having the same problem using WP2.5.1.
ReplyAndy May 18th, 2008
Thank you :-)
Replytschörda May 19th, 2008
excellent! works like a charm! thx!
ReplyNolawi May 20th, 2008
Thank god someone explained this, i have been looking for a solution for a month now… thank you
the WP support is so lame these days
Replykocu May 20th, 2008
been waiting for some time for an official help. I’m not sure at first to test your solution, but I’m glad I decided to go for it. That’s a great help you’ve helped me with. Thanx.
ReplyChris May 22nd, 2008
Thanks — that fixed the problem immediately!
ReplyMark May 25th, 2008
Thanks! It worked! I finally have images on our blog!
Replysorin May 25th, 2008
i have a problem, i inser the cod in .httaccess, and the upload work but after some time, don t work again and the cod from .httacces disappears. Why?
Thanks
ReplyMachine May 25th, 2008
Thanks a lot mate. I was pulling my hair out with the problem. I though it has something to do with my ISP or chmod setting. Glad that I found this blog.
ReplyThanks a ton.
Matt Thornton May 26th, 2008
Perfect, worked for me. Many thanks.
ReplyRonny-André May 27th, 2008
This didn’t do it for me. I’ve tried every trick there is out there, but nothing does it for me :(
ReplyPhillip May 27th, 2008
Awesome fix! Thanks a lot!
Replysinus May 28th, 2008
thanks for that fix. great help!
ReplyMalinthe May 31st, 2008
Wow thanks! You’re a Lifesaver! :)
ReplyGot this image uploading problem after I changed my server. Now it’s working great. Thanks again!
Alan Cordle June 2nd, 2008
I get the same error as #71 above. The image now “crunches,” but when I try to insert into a post, the error message is:
Precondition Failed
The precondition on the request for the URL /blog/wp-admin/media-upload.php evaluated to false.
Apache/1.3.37 Server at alancordle.com Port 80
I’d appreciate any ideas.
Thanks.
ReplyRebecca June 5th, 2008
Worked like a charm! Thanks!
I was worried i had done something wrong with the upgrade, glad to know it wasn’t just me :).
ReplySveden June 6th, 2008
Oh mai goodness! Thanks so much this worked like a friggin charm.
ReplyKevin June 6th, 2008
Works for me! Thanks!!
ReplyCrystalline Tulip June 9th, 2008
Thank you SO MUCH!!! I’ve been very frustrated and now my images upload perfectly.
Replywebmaster sitesi June 10th, 2008
CHMOD to 777
ReplyJohn June 12th, 2008
My host doesn’t allow me to turn off mod security in .htaccess and commented it out. So I am still fucked with IE. But when I use Firefox, I can upload pictures. Strange.
ReplySteve June 15th, 2008
Worked like a charm. Thanks a bunch!
ReplyDave June 21st, 2008
Now i have the same precondition failed error as posters 46 and 63 when i try to ‘insert into post’.
Does anyone have a solution for this? please!!!
ReplyDave June 22nd, 2008
Found a fix for the precondition failed error…
Just type this in your .htaccess file:
SecFilterEngine Off
ReplySecFilterScanPOST Off
Dave June 22nd, 2008
sorry, the last post didn’t show up correctly…
just remove the “files async-upload.php” and “/files” tags and it should fix it.
ReplyFlash Buddy June 22nd, 2008
Interesting to see so many success stories yet for a few, including myself there is no joy.
In my case the file appears to upload successfully with no http error yet the upload box then displays the WordPress login screent?! No ability to add title, description etc; and the photo does not appear in the gallery. Go figure?
Replyjoe c June 23rd, 2008
Many Thanks
Replypatrick June 26th, 2008
For those who get the Wordpress login, you may want to look what is the name of the website you used during configuration. I.e. did you use http://www.yourdomain.tld or yourdomain.tld you can find this by going to your admin interface, click on settings under general you will find the: WordPress address URL ; you should logout of your admin area, and login at the EXACT url given in that field.
This also has to do with some protections on a server; while it is a pain, it might even be worse if these security settings are not in place. Hope this helps!
Replycentrinads June 27th, 2008
This bugs is only happen if you use IE browser. Default wordpress 2.5 configuration works very fine with Firefox.
Aside by putting your head to the wall adding the code to .htaccess file and so, why not change your browser to firefox? Much more easy and you can upload your images file without any problem!
http://www.centrinads.com/wordpress/wordpress-25-images-uploaded-error-with-ie/
Replydara June 27th, 2008
I love you!!
ReplyJo June 29th, 2008
why on earth WP’s official DOC didn’t mention this thing ??? heck.. i search around its site.. they just ask me to CHMOD wp-content,upload folder to 777. it didn’t help …
your snippet code is awesome..
Replywondering .. is it safe putting that in our .htaccess ?
Eric June 29th, 2008
Pour moi ça marche très bien (version 2.5.1) MERCI!!!!
ReplyAngeleyes July 9th, 2008
I have a few blogs and they are of different WP versions as I dare not update them until the latest version is more stable… not apparent bugs.
Since the htaccess is in the main directory, if I change it, will it affects my older WP versions blogs?
This is driving me nuts! :|
ReplyAria July 9th, 2008
Thanks so much for tips to fix those error..
Regards,
Aria
ReplyBert July 11th, 2008
Did you put the link to the uploaded picture into the custom field called thumbnail? If you don’t know what this is about, read the comments on the site where you got the theme.
Reply1 you have the create a custom field called thumbnail
2 with every post you have to select the thumbnail field and put a link into this field which leads to a uploaded image file.
So first you need to have one or more uploaded images and select the link to one of them in the media library.
This link you put in the thumbnail field of your posting.
Trackbacks