wordpress http error crunching .htaccess

Fix the common Wordpress image upload http error while crunching. Just add “AddType x-mapp-php5 .php” to the top of your .htaccess file! (Wordpress 2.8.6)

The Problem:
Whenever I would try to upload an image to my blog the file would upload, but I would then get a red http error, as seen in this picture below:


http wordpress crunching error


With this error it wasn’t possible for me to choose the preset image size “medium”, which I configured to the width of one column. Here is what I’m talking about:


affected by error


The Solution:
Just open your .htaccess file that is in the same folder as your wp-content folder:


where htaccess


and add “AddType x-mapp-php5 .php” to the top, as so:


edited htaccess


Once you save that, you should be able to upload pictures without the error and regain wordpress’s resizing feature.


upload error fixed


I got this little snippet from errors when installing either joomla or drupal, so when this http error came up, I figured it couldn’t hurt if I add it to .htaccess for wordpress and it worked! Hopefully this helps since online I didn’t see anyone else recommending this fix.

85 thoughts on “wordpress http error crunching .htaccess”

  1. I have the same problem as above ‘Thomas Taylor’ and relatively new to this. Does anyone know how to fix if using Go Daddy? So frustrated.. :0(

  2. As is clear from this thread there maybe other reasons why uploads fail in your case, so always check the error logs for your site’s virtual host.

    The error logs for the site I’ve just fixed said “mod_fcgid: HTTP request length 132005 (so far) exceeds MaxRequestLen (131072)”. In this case the web server uses Apache plus the mod_fcgid Fast CGI module (http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html), and had nothing defined for FcgidMaxRequestLen in the Apache config file (the default is to allow a max http body length of 131072 bytes). I added “FcgidMaxRequestLen 134217728” to the config file to set a max of 128MB, restarted Apache, and the upload problem was fixed… no need to edit move or copy WordPress’s .htaccess file.

  3. Hello, Two weeks ago I installed a plugin and I got an error saying that the htacces is very small and if my site is working properly to ignore this issue so I ignored it but I am concerned if this can cause me any troubles in the future. What do you think. Is this normal?

    1. Was is a warning that the memory was low? Depending on your network/server set up you might be able to set it to give you more memory. I don’t know how to do this, mostly b/c this is hosted on a shared 1&1 server, so I’m limited to a small amount of memory. Good luck!

  4. I just got a new hard drive put into my computer and now I searched for the wp-admin folder to add the htaccess code. Am i missing a program or a driver?

  5. Thanks but it doesn’t work for my site. When I open the file, I saw those Begin W3 Total Cache thingy. Added at the top and all alignment went hairwire. I added below and right above begin WP and same problem.

    Guess something was wrong since I got w3 total cache?

    Please advise.

  6. awesome. so far so good. the funny thing is – it used to work without this entry in the .htaccess. so now why is it acting up?

  7. So, the solution in the end was have support go through several possibilities. At first, support thought it was WordPress itself creating the errors, but infact it was simply a case of turning off FastCGI in the PHP options/manage domain panel and switch it to PHP 5.3xCGI.

    Now, images upload without a issue. Hopefully this will help someone else with the same problem.

  8. I ran into this issue too for WordPress on IIS using PHP 5.3. It only occurred for large files. The issue turned out to be max_input_time (and maybe max_execution_time) in php.ini. It defaults to 60 seconds (1 minute) which wasn’t enough for the size of the files we are uploading.

    The error log at C:\Windows\Temp\php53_errors.log mentioned max_execution_time being reached. But every time I raised max_execution_time it would fail and the error message would reflect the new number until I was using 12000000 for a file that took about 1 1/2 minutes to upload. Obviously it wasn’t really using that number even though the error message said that it was. I took a guess at max_input_time by raising that to 1800 and after that it was good.

  9. Got this after I did the edit. It showed up where you can select the image size after crunching and replaced everything.

    post_type ) wp_die( __( ‘Unknown post type.’ ) ); $post_type_object = get_post_type_object( ‘attachment’ ); if ( ! current_user_can( $post_type_object->cap->edit_post, $id ) ) wp_die( __( ‘You are not allowed to edit this item.’ ) ); if ( 2 == $_REQUEST[‘fetch’] ) { add_filter(‘attachment_fields_to_edit’, ‘media_single_attachment_fields_to_edit’, 10, 2); echo get_media_item($id, array( ‘send’ => false, ‘delete’ => true )); } else { add_filter(‘attachment_fields_to_edit’, ‘media_post_single_attachment_fields_to_edit’, 10, 2); echo get_media_item($id); } exit; } check_admin_referer(‘media-form’); $id = media_handle_upload(‘async-upload’, $_REQUEST[‘post_id’]); if ( is_wp_error($id) ) { echo ‘
    ‘ . __(‘Dismiss’) . ” . sprintf(__(‘ā€œ%sā€ has failed to upload due to an error’), esc_html($_FILES[‘async-upload’][‘name’]) ) . ‘
    ‘ . esc_html($id->get_error_message()) . ‘
    ‘; exit; } if ( $_REQUEST[‘short’] ) { // short form response – attachment ID only echo $id; } else { // long form response – big chunk o html $type = $_REQUEST[‘type’]; echo apply_filters(“async_upload_{$type}”, $id); }

  10. ok i got it. for some reason, my wordpress install (on Surpass Hosting) doesn’t like the photos. It works when I resize them to 800×600. Before it was 1024×768

  11. I ran into the HTTP Error” when uploading a bunch of images to one of my blogs. However, only with some images. After some experimenting, I discovered that even through the files where small in size, the images were still quite large. I changed the dimensions on the images that I had problems to to match the others, and they processed without an error.

  12. I’ve got the almost similar problem, then just tried your solution. Unfortunately, it was unwork. Suddenly I realized: “Written on December 13th, 2009”

    Any way, thank you.

  13. I have the same issues, but the solution didn’t work. Can someone help? here is how my.htaccess file looks like. It was in the root folder, I moved it to wp-content. Still no luck.

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    order deny,allow
    deny from all
    allow from all

    order deny,allow
    deny from all

    AuthName rohanjuierie.com
    AuthUserFile /home/rohanjui/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/rohanjui/public_html/_vti_pvt/service.grp

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

  14. Thanks!
    I have the same problem in JUNE 2014 (today) for a complete new site that i’m developing in wordpress and this solution save me!!!

  15. I disabled a plugin which was last installed and got it fixed. Just try deactivation each pluging seprately and try uplaoding at the same time, hopefully you will get an idea which plugin is creating problem.

Leave a Reply

Your email address will not be published.