WordPress 2.5 Image Uploading Problem Fix

I’ve come across many blog and forum posts about the image uploading problem in WordPress 2.5. When you try to upload an image, you may receive an error that reads “HTTP error” and in the Crunching dialog “An error occurred in the upload. Please try again later.”

There are several fixes floating around for the image upload error, so I thought I’d post the most common fixes.

Mod_Security Fix

To try this fix, locate your .htaccess file in your wp-admin directory. The easiest way to edit the file is to open it in Notepad (select “All files” in the “Files of type” menu or you won’t see your .htaccess file).

Open the file and add this code:

<IfModule mod_security.c>

<Files async-upload.php>

SecFilterEngine Off

SecFilterScanPOST Off

</Files>

</IfModule>

Save the file (make sure you don’t save it as a .txt file) and reupload to your WordPress installation. If you don’t want to mess with your .htaccess file, you can download a plugin that does the same thing.

Download mod_security fix plugin from WordPress.org

Simply upload to your plugins directory, activate it and it accomplishes the same thing as editing the file by hand.

Chmod your upload directory

If the above fix still didn’t allow you to upload images, CHMOD your wp-content/uploads folder to 777.

Typically WordPress uses 755 for directories and 644 for files. For security purposes, many hosts require user-spawned processes to have a unique identity. Therefore 755 won’t allow creation of new files and 644 won’t allow for saving of changed files. That is the purpose of the 777 chmod.