HTTP error every time I upload an image to wordpress

Is there a reason I get an HTTP error every time I upload an image to word-press?

I’m sure there is. Can you post a screenshot?


This question is not related to Cloudflare but more specifically about WordPress.

HTTP error can occur due to Internet connectivity issue. Or, memory issue.

Try this code in the wp-config.php

define( 'WP_MEMORY_LIMIT', '256M' );


One more thing, make sure that at “Media” settings, correct directory path exist.

I’m still getting the error after fixing both of these

What is the error message and at which point does the upload fail?

Here’s the HTTP error message that shows up right after the picture won’t upload (as you see the blue bar fully loaded on the most recent picture)

First thing I suggest would be to check your server’s HTTP logs for a more descriptive error message.

I do see you’re running two security plugins. You should probably stick with one. I use the WP Migration plugin, but not their security one. I use Wordfence, as I see you also have. Try turning off the All In One security plugin and see if that helps.

I did that and I am still getting the error. How do I check my server’s HTTP logs so I can relay a more descriptive error message to you?

I’ll give answering this a shot since I’ve moved from custom building websites to using a wordpress theme and have run into lots of errors with different providers. The person who gave the advice about increasing the file size limit is probably right, but may you need to do it in the control panel. Here are the steps for cPanel on Linux (see screenshots). once you change the setting you may need to wait some time for it to take effect (probably 5 minutes, but who knows). If you change the size using the code the previous person suggested, maybe an extra step is required for the setting to take effect?

Please note you don’t need to change the PHP version or anything, and you don’t need to bother with any of the checkboxes on that screen. It’s annoying that the important stuff is only accessible from the link on this screen.

For me, upload_max_filesize set to 16M is plenty but you can set it to whatever you want. If its set to 1MB or something then you’ll know that’s your problem.

I’ll also add that on go daddy servers the memory_limit setting is set to 64M and php quickly runs out of memory with this. While you are at it, bump it up to 192M if you can. This particular server has 512MB allocated and PHP uses a lot of memory, especially with the theme I’m using.

Hidden imgur link to steps:

So I’m not sure it will work but these steps are clear and can hopefully let you know what is not wrong.

How would I do this if my hosting is through namecheap though? I don’t have cpanel (since I don’t go through GoDaddy)

In my post, the screenshots are actually all from shared Linux hosting with namecheap hosting. If you signed up for Linux hosting with them you almost certainly have cPanel which is a generic control panel used by lots of web hosts. If you have Windows hosting I’m not sure what they use for the control panel. However, you should be able to find those settings in there somewhere. PHP is going to run on both Windows and Linux and if you poke around enough you should find the same settings.

Okay thanks so much man! I checked through namecheap and still can’t find cpanel. I’m going to contact them and see what I can find

This topic was automatically closed after 14 days. New replies are no longer allowed.