Each time I try to upload an image using the WordPress Media Uploader (WP Admin > Media > Add new) the upload stalls at around 13% and I get an error message appear on screen "HTTP error"
.
So far I have created a php.ini file in my WordPress root with the following:
memory_limit = 256M
upload_max_filesize = 16M
post_max_size = 64M
I've also put a php.ini file in my /wp-admin/ folder (an exact duplicate of the above).
After checking with phpinfo()
I can see these changes have taken effect but they have not resolved the 'HTTP error' problem I am getting.
I am using a 1and1.co.uk dedicated server (managed) so don't have root access. 1and1 have confirmed plain CGI is enabled on the server (not Fast CGI if that makes much difference?).
Why might this error be happening? Is there anything else I can do to try to resolve it?
UPDATE: I have done some testing using different browsers and different devices:
Acer Aspire One netbook
Acer Aspire 5552 laptop
Google Nexus 7 tablet
Samsung Galaxy G4 Mini
As you can see the problem only exists in Chrome, FF and Safari on my Acer Aspire One netbook. What could be the source of this problem?
The image upload issue in WordPress is typically caused by incorrect file permissions. Your WordPress files are stored on your web hosting server and need specific file and directory permissions to work. Wrong file permissions prevent WordPress from reading or uploading file on the hosting server.
I found a simple solution. If you save the post you are working on as a draft, then attempt the upload again, it works. This appears to happen if you have been drafting a document for a long time, without manually saving. Once you manually save, it resets the upload ability somehow, and the problem goes away.
I put the following code into my functions.php file. It works!
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With