30 March 2008 @ 18:55Fix Wordpress 2.5 upload error – HTTP error
The solution for me was to edit the .htaccess file in the root directory of my webserver (the directory where Wordpress is installed). Add the following to the the .htaccess file after the “END WordPress”:
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
If you are having the problem of your .htaccess file losing its changes, you have most likely put something inside the Wordpress block of the .htaccess file. Keep any custom changes outside of that block or they will be overwritten.
It seems that this problem still occurs in Wordpress 2.6, but the error message is slightly different — “An error occurred in the upload. Please try again later.”
Related posts
by Jon | 33 comments | Tags: .htaccess, bugs, fix wordpress upload error, wordpress, wordpress http error, wordpress upload error
Posted in bugs, wordpress | Link to this

























Thanks a lot for this, I was really searching a fix for wp2.5
You’re welcome. I know how aggravating this problem was.
Hey,
That was a very quick and easy help! Thanks very much.
No problem, Pat.
I cant get this to work and its driving me nuts!
Jake, can you give me some more details about what all you have tried and the errors?
This worked for me. I did not have an .htaccess file, but put the above code by itself into a new .htaccess file and it worked fine. Thx.
Thanks man, that worked for me! But what was actualy wrong with 2.5? Why was that needed?
I honestly don’t know what changed in WP2.5 to cause this error. The only thing that comes to mind is the new Flash uploader, but that may have nothing to do with the error itself.
I saw that the server doesn’t recognize the esistence of the “uploads” folder and once You have created it again, after you upload a file, it doesn’t recognize the folder again, telling me the “uploads” folder doesn’t exist.
Hello,
Thanks for the tip, but I still get the ‘http error’ message when I try uploading with the Flash thing. Here’s my .htaccess file. Maybe I have it in the wrong place in the file?
———————————
RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
SecFilterEngine Off
SecFilterScanPOST Off
———————————
Thanks for any help.
It looks like parts of the rules are missing (update: I just realized that some of that is because the comment was reformatted). For example, here is my full .htaccess file:
Be sure that the rules are exactly like the example in the original post.
Under Wordpress -> Settings – > Miscellaneous make sure your uploads folder is set to
wp-content/uploadsAlso check the permissions on the uploads folder. Mine are set to 755.

Thanks a lot. Now fixed.
Greetings,
Just moved my wordpress 2.5 installation to a new server and everything works ok, except now I am getting this HTTP error when I try to upload images and one other odd thing, I get a 404 page when I try to hit Save when editing a post.
I followed the instructions above and they haven’t helped at all. Here’s my .htaccess file, which is located in the public_html folder of my account (the main wordpress folder is /wpress). Any idea at all what I could be doing wrong?
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
SecFilterEngine Off
SecFilterScanPOST Off
Avram, your .htaccess needs to be in your /wpress folder, not the public_html folder.
I’ve tried changing my permissions to 755 on my my ‘upload’ folder, but it still doesn’t work. I’m going to try the .htaccess approach. Sorry to sound simple but this .htaccess file, it will have to have a name, can it be anything e.g.
file.htaccess? This .htaccess file will go in my wp-admin folder, is this right.
Hope you can help.
Pete,
That is the entire name of the .htaccess file — .htaccess
The .htaccess file does not need to go in your wp-admin folder. It needs to go up one level and in the same folder as wp-app.php, wp-atom.php, etc.
Eureka and thanks very much, that has indeed worked. Well almost! The image doesn’t appear but a placeholder does. I’ve looked at the html and it has a sort of date like this
wp-content/uploads/2008/06/file name.jpg
If I delete the 2008/06/ from the html it works perfectly. Would you know of a way to get rid of the date part of the html?
Thanks again
Pete
You may need to play with your settings under “Miscellaneous”. It sounds like the problem lies there. Here is how mine is set:
Store uploads in this folder:
wp-content/uploadsFull URL path to files (optional)
(checked) Organize my uploads into month- and year-based folders
Many thanks again, that was the problem. I have another! I’m trying to style the images e.g.”alignleft”. I’ve looked at my style.css and entered a alignleft class and uploaded it, but it’s ignored. Which stylesheet are the image styles in?
I have my WordPress in a sub folder of my static website. http://www.mywebsite.com/blog/wp-content/themes/mythemefolder/style.css
I’ve also tried changing the blog/wp-admin/css/global.css but that does not work either. If you have time I’d grateful for any advice. Thanks.
Pete,
Your style.css will probably be different than mine, but the idea is to find the style for img for entry, and add some classes to them
div#page div#main div#leftside div.post div.entry img.alignleft {float: left}div#page div#main div#leftside div.post div.entry img.alignright {float: right}
div#page div#main div#leftside div.post div.entry img.aligncenter {text-align: center}
Hopefully this will get you headed in the right direction.
Thanks again for your expert help. I’m now in the right direction.
I’m happy I could help, Pete.
Thanks for the solution! Finally I can upload the images again.
You’re welcome, SilentDog.
Thanks for the tips. I just copy and paste your tips into my .htaccess file and successfully upload the required files.
Thanks again.
[...] Compliments of: http://geek.thinkunique.org/2008/03/30/fix-wordpress-25-upload-error-http-error/ [...]
[...] : http://geek.thinkunique.org/2008/03/30/fix-wordpress-25-upload-error-http-error/ Leave a [...]
Thanks–this fixed my problem!
Cheers
beautiful fix – many thanks.
Wow, thanks this works also in WP 2.7.
[...] googling around, I figured out the similar problem here. Though in my case .htaccess file was blank (in root www directory of wordpress). I added following [...]