When uploading an image on my WordPress blog, I received a general error that said HTTP error. As a result, the image upload failed. Luckily, I quickly found a fix.
I recently upgraded my PHP version because of the speed improvement and the security patches. So I first tried looking for a permission mismatch somewhere, or a php.ini configuration typo or something along those lines. Even as a hobby web developer, it’s important to cover all possible areas.
To fix the image uploading error on WordPress, you should explicitly add this line to your
.htaccess file. So go to the root of your WordPress installation (the same directory where you find
wp-config.php). Open it and at the very top of that file, add:
AddType x-mapp-php5 .php
Now try again to upload a file and everything should be working fine again. HTTP error message resolved, ready to take on the next challenge you encounter in developing your website or blog!