Do you need to fix the HTTP image upload error in WordPress?
This error can be particularly frustrating when you are creating content in WordPress. It usually occurs when you are uploading an image or other files to the CMS using the built-in WordPress media library.
In this article, we will show you how to easily fix the HTTP image upload error in WordPress.
What Causes the HTTP Error During Media Upload in WordPress?
Many things could lead to an HTTP error when you are trying to upload files to your WordPress website using the WordPress media uploader.
Basically, WordPress is unable to figure out the cause, and that’s why it displays the generic ‘HTTP error’ message.
The frustrating thing about this WordPress HTTP error is that it doesn’t give you any clue about what may have caused it. This means that you will have to try different solutions to find the cause and fix the error.
That being said, let’s take a look at how to troubleshoot and fix the HTTP error during media upload in WordPress. Feel free to use the links below to skip to a specific method:
Method 1: Make Sure the HTTP Error Is Not Temporary
First, you should wait a few minutes and then try uploading your image file again to your WordPress website. This error is sometimes caused by unusual traffic and low server resources, which are automatically fixed on most WordPress hosting servers.
If that doesn’t work, then you may want to try one or more of the following:
- Refresh your browser or clear your browser cache.
- Resize and rename the file and upload it again to the media library. Check out our list of image optimization plugins to reduce your file size.
- Save the file in a different format. For example, you can change JPEG to PNG using image editing software. After that, retry uploading the file.
If following all these steps still results in the HTTP error, then the error is not caused by a temporary glitch and definitely needs your immediate attention.
Method 2: Deactivate All WordPress Plugins
If you just installed a new WordPress plugin recently, it may be incompatible with your other plugins and disrupt the image upload process. To see if this is the case, you can deactivate all your WordPress plugins.
If the HTTP error disappears after deactivating a WordPress plugin, then that may be the culprit behind the HTTP upload image error. You can install an alternative plugin or contact the developer for support.
For more information, check out our guide on how to easily deactivate all WordPress plugins and how to deactivate plugins when the WordPress dashboard is inaccessible.
Method 3: Increase WordPress Memory Limit
WordPress is written in the PHP programming language. Additionally, the amount of memory allocated for different PHP processes is determined by your web hosting server.
If uploading images requires more PHP memory than is available, you may see the HTTP image upload error in WordPress.
To fix this, you need to increase the memory PHP can use on your server.
You will first need to access your site’s files using an FTP client or the File Manager app in your web hosting dashboard. Next, go to your root directory and find the wp-config.php file.
You will then need to edit the wp-config.php file using a text editor and add the following line of code to it:
define( 'WP_MEMORY_LIMIT', '256M' );
This code increases the WordPress memory limit to 256MB, which would be enough to fix any memory limit issues.
Finally, you must save and upload the file back to the server.
To learn more, please see our step-by-step guide on how to increase the PHP memory limit in WordPress.
Method 4: Change the Image Editor Library Used by WordPress
WordPress runs on PHP, which uses two modules to handle images. These modules are called GD Library and Imagick. WordPress may use either one of them, depending on which one is available.
However, Imagick often runs into memory issues, causing the HTTP error during image uploads. To fix this, you can make the GD Library your default image editor.
You can do this by simply adding this code to your WordPress theme’s functions.php file or using WPCode (recommended):
function wpb_image_editor_default_to_gd( $editors ) {
$gd_editor = 'WP_Image_Editor_GD';
$editors = array_diff( $editors, array( $gd_editor ) );
array_unshift( $editors, $gd_editor );
return $editors;
}
add_filter( 'wp_image_editors', 'wpb_image_editor_default_to_gd' );
For more details, you can see our guide on how to add custom code in WordPress.
After adding this code, you can retry uploading files using the media uploader. If this doesn’t solve the issue, then you can remove this code and try other methods described in this article.
Method 5: Use the .htaccess Method
This method allows you to control how Imagick uses server resources. Many shared hosting providers limit Imagick’s ability to use multiple threads for faster image processing. However, this will result in you seeing the HTTP error when uploading images.
An easy fix is to add the following code in your .htaccess file:
SetEnv MAGICK_THREAD_LIMIT 1
This code simply limits Imagick to use a single thread to process images.
Method 6: Update Your PHP Version
If your WordPress site is using an outdated version of PHP, then it could trigger the HTTP image upload error. This is because newer PHP versions have performance improvements and generally use less memory.
Luckily, it’s easy to check and update your site’s PHP version. For more details, please see our beginner’s guide on how to update your PHP version in WordPress.
We hope this article helped you fix the HTTP image upload error in WordPress. You may also want to see our ultimate list of the most common WordPress errors and how to fix them, along with our expert picks for the best email marketing services for small businesses.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
WPBeginner Support says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Admin
Greg Zelt says
FANTASTIC!!! Every other search I did yielded nothing.
Godaddy hosting with wordpress installed. Killing imagick did the trick. My lightroom plugin is functioning like a trooper now.
Thank you so much, just had to share with you.
WPBeginner Support says
Glad our guide was able to help
Admin
Felix says
Solution #3 works for me like a charm!
WPBeginner Support says
Glad our recommendation worked for you
Admin
George says
Hi,
I started having this HTTP uploading error for images that are larger than 600x900px . The size in KB doesn’t matter – 100KB or 300KB – they are uploading just fine if they are less then 600×900.
I have tried all the methods you described without success.
Do you think that changing the theme can help?
WPBeginner Support says
You would first want to reach out to your hosting provider to ensure you are not running into a safety measure from their end that would cause the error.
Admin
George says
Thanks!
I called them before posting my question – they told me to contact WP support. To me, it also looks like they installed something on their server but are not willing to admit it.
I’ll call again.
fred david says
#3 worked for me too
WPBeginner Support says
Glad our recommendation worked for you
Admin
Baskar says
The Option No.3 is giving perfect result. Thanks Bro !
WPBeginner Support says
Glad our recommendation was helpful
Admin
Monique says
Instruction #3 worked for me. Thank you a bunch for this helpful documentation
WPBeginner Support says
You’re welcome, glad our guide could help
Admin
edsbali says
Solution number 3 worked for me
WPBeginner Support says
Glad our recommendation was able to help
Admin
DAMIAN says
The functions.php method worked for me. I’ve been trying to fix that for months! You saved me a lot of time. Thank you!!!
WPBeginner Support says
Glad our article could help
Admin
Almudena says
I have tried all the methods and none worked.
WPBeginner Support says
You would likely need to reach out to your hosting provider and they should be able to help solve the issue
Admin
Stu says
The functions.php method worked for me. Thank you for solving a months old problem!
WPBeginner Support says
Glad our recommendation could help you solve the issue
Admin
Ken Chan says
Thank you!! This was driving me crazy! #2 didn’t work but #4 did.
WPBeginner Support says
Glad our recommendation could help
Admin
Joe says
Solution #3 work like a charm! <3
WPBeginner Support says
Glad our guide could help
Admin
AG says
Tried all the above and no luck. My issue is only mp3 files, I get the http error. Contacted my hosting provider and they could find nothing wrong. Images upload fine. What am I missing?
WPBeginner Support says
For MP3 files you may need to increase the memory limit to 512 in case it is due to how large the files are
Admin
Stacey says
Number 3 worked for me! Thank-you so much, that was so frustrating before. You’re site is always so helpful
WPBeginner Support says
Glad our guide could be helpful
Admin
Mark R says
Thank you so much, I went through all four steps but nothing worked. I went back to step 1 and increased it from 256mb to 512mb which solved the problem.
WPBeginner Support says
Glad our guide could help be a part of the solution and you were able to get it resolved
Admin
KKervin says
Option #3 worked for me to resolve the HTTP error.
I installed the code snippets plugin and copied the code from here. It worked perfectly the first attempt.
Thank you!
WPBeginner Support says
Glad our guide could help you
Admin
yoeri says
Also just check the name of your image you want to upload.
Make it simple as this has done the trick for me on multiple occasions.
WPBeginner Support says
Thanks for sharing what worked for you
Admin
Lee says
@Yoeri – Thank you, for me it was just the image name as you suggested, I simplified the name, (it had spaces)
mohad ali says
can cloudflare cause this problem?????????????
WPBeginner Support says
While possible, it is not likely the root of the problem.
Admin
Apurba says
Thanks. No 3 works for me. great tutorial man
WPBeginner Support says
Glad our guide could be helpful
Admin
Honk the Honkler says
The .htaccess addition worked for me:
SetEnv MAGICK_THREAD_LIMIT 1
WPBeginner Support says
Thanks for sharing the solution that worked for you
Admin
Rory says
Another issue can be an apostrophe in the title i.e. dove’s it should be doves.
WPBeginner Support says
Thanks for sharing that recommendation to check
Admin
Yatu says
None of the methods is working. Please help!
WPBeginner Support says
Have you reached out to your hosting provider to see if there are any errors on their end?
Admin
Barri says
No 3 worked for me. thanks so much
WPBeginner Support says
Glad our guide could help
Admin
Jen Niles says
None worked above and then we realize our dev site needed to change the Home and Site URL in General Settings in WP Admin from http:// to https:// then it worked!
WPBeginner Support says
Glad you were able to find the cause of the problem for your site
Admin
Brian says
Thank you! #3 worked for me
WPBeginner Support says
Glad our recommendation could help
Admin
Lloyd says
great!!! it worked well. Thank you
WPBeginner Support says
Glad our guide could help
Admin
Marek says
None of these worked in my case. Mod security was the cause. I had to temporarily disable mod security on my web server.
WPBeginner Support says
Thanks for sharing what worked for you if other users run into this problem. For most users, they will need to reach our to their hosting provider for assistance in editing mod security
Admin
Stephen says
#3 WORKED!!!!! THank you so much for your help!! Stupid go daddy…
WPBeginner Support says
Glad our recommendations could help
Admin
JJ says
SOLVED: my pdf files that would not upload into the Word Press media library with HTTP Error had file names with a semi-colon in them. I deleted the semi-colon and it uploaded just fine. Semi-colons are legal characters in Word docs and pdf files, but apparently won’t upload to Word Press for reasons beyond my knowledge. ; ; ; ;
WPBeginner Support says
Thanks for sharing that solution for anyone else running into that problem
Admin
Kat C says
You’re a lifesaver! #3 worked on an old Godaddy Legacy server. Thanks so much.
WPBeginner Support says
Glad our recommendation was helpful
Admin
namagard says
the third one worked for me. thank you so much. ♥
WPBeginner Support says
Glad our recommendations could help
Admin
Mark says
Thank you!!! it worked!!!
WPBeginner Support says
Glad our tutorial could help
Admin
Westleboii says
None of these work for me. please help
WPBeginner Support says
If none of these methods worked, have you tried reaching out to your hosting provider to see if they can see an error on their end?
Admin
Renée says
A combined 2 and 3 worked for me, thank you!
WPBeginner Support says
Awesome! Glad our solutions could help fix the problem
Admin
PJ says
Setting GD as my preferred upload method worked for me.
WPBeginner Support says
Thanks for sharing which solution Worked for you
Admin
Erin says
Method #4 worked for me. It seems my host was limiting the plugins processing power. Thanks for sharing these solutions.
WPBeginner Support says
Glad our guide could help
Admin
Brad says
Another common problem for this is that you used an apostrophe in the file name. I just encountered this problem
WPBeginner Support says
Thanks for sharing what solved the problem for you
Admin
sarah says
Thank you! This was the simple fix I needed!
Ruth says
Thanks a lot, it worked!
WPBeginner Support says
Glad our tutorial worked for you
Admin
Shane says
Hi,
Thanks a million for this. Method 3 worked for me.
WPBeginner Support says
Glad our article could help
Admin
LEGEND says
#3 is super
WPBeginner Support says
Thank you
Admin
George R says
I have tried all the methods as mentioned above but none of these worked for me. So I contacted the service provider. They resolve the issue.
They have refreshed and whitelist another IP for me and it works.
Hope this may help for you too.
WPBeginner Support says
Thanks for sharing what worked for you
Admin
Stuart says
Go into Jetpack and disable the CDN option was how I fixed mine.
WPBeginner Support says
Thanks for sharing your solution to this problem
Admin
doun says
i have try all the methods above but still not working with me
WPBeginner Support says
Have you reached out to your hosting provider to ensure they don’t see any errors on their end?
Admin
Ashok says
Thanks guys, it worked. Fantastic solution.
WPBeginner Support says
You’re welcome, glad our guide could help
Admin
love says
don’t need to follow all step you just need to re-login your website and clear your temp files, that ok
WPBeginner Support says
For some people maybe, for others, they do require all of the steps in the article.
Admin
Harsha D says
#3 works perfectly. Thank you wpbeginner team.
WPBeginner Support says
Glad our article could help
Admin
Pawel Mansfeld says
OMG, I can’t believe! #3 works perfectly. Thank you for this tutorial!
WPBeginner Support says
Glad our article could help
Admin
John says
not worked with any method
WPBeginner Support says
If none of the methods in this article worked, you may want to reach out to your hosting provider to try the general troubleshooting steps in our article: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
Sandy says
I tried Option 3. Now my entire home page is blank. Individual pages are still there. The Sidebar is still visible, but the rest of the home page is blank.
Please help if possible.
Thank you,
Sandy
WPBeginner Support says
You may want to ensure you didn’t change your homepage settings while troubleshooting and have you removed the code to see if that solved the missing content?
Admin
Sanju says
Worked like charm Option 3.
While My wordpress admin panel is slow.. Working on it. Any guide?
WPBeginner Support says
You may want to try disabling your plugins to see if one of your plugins could be slowing the admin area.
Admin