Posts Tagged ‘image uploading’

Wordpress 2.5 Image Uploading Error

Saturday, July 5th, 2008

If you have upgraded to wordpress 2.5 or 2.5.1 ,it is the mostlikely problem you will find while trying to upload images using media manager.

You will get something like shown below “HTTp Error”

This is a very simple problem,related to the security setting.The default security settings in the .htaccess file of wordpress restricts file upload in wordpress 2.5 and 2.5.1 .

The default Wordpress .htaccess in 2.5.X looks like this

# BEGIN WordPress
 
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
 
# END WordPress

Now you need to modify it slighlty in order to make the file uploading work.
Add the following two lines after the wordpres block.

SecFilterEngine Off
SecFilterScanPOST Off

so the final .htaccess file looks like

# BEGIN WordPress
 
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
 
# END WordPress
SecFilterEngine Off
SecFilterScanPOST Off

Now the last two line simply makes security Filter engine off allowing the file upload.
That’s all , now upload the modified .htaccess file to the root folder of your wordpress installation.

Suppose you have installed it on www.example.com/blog/
then the .htaccess file must be in /blog/folder .
That's all ,now go to the write post section and try to upload image,
You will find no problems this time.