Website Errors

How to Fix WordPress “HTTP Error” When Uploading Images

HTTP errorPlain English: WordPress failed to receive or process your image on the server side — it is a vague catch-all label, not a problem with your internet connection.
Quick answer: The “HTTP error” means the server choked while handling your image upload. In most cases the fix is simple: compress the image to under 2 MB, rename it without special characters, and try again. If that fails, work through plugin conflicts, the PHP memory limit, and the image editor settings below.

What HTTP error means

You are adding an image in WordPress — through Media, then Add New, or directly inside the block editor — and instead of the image appearing, you get a small red “HTTP error” notice under the file. The upload progress bar may reach partway and then stall, or the error may appear instantly. It is one of the most frustrating messages in WordPress precisely because it tells you nothing: there is no code, no hint about what went wrong, just two words.

Here is what those two words actually cover. “HTTP error” is the media uploader’s generic label for any server-side failure during an upload. Your browser sent the image fine; something went wrong after it arrived. The most common reason is that the server ran out of memory while trying to process the image — WordPress does not just save your photo, it opens it, rotates it, and generates several thumbnail sizes, and that work needs a lot of RAM. Other possibilities include the image-processing library crashing, a plugin interfering with the upload, a file name with characters the server cannot handle, or the server killing a slow request before it finished.

One important pattern: if small screenshots upload fine but full-size photos from your phone keep failing, you are almost certainly looking at a memory or size problem, not a broken site. Phone cameras now produce 8 to 15 MB images, while shared hosting plans commonly cap PHP memory at 128 MB. Processing a single large photo can need three to five times the file’s size in memory, so the upload dies silently and WordPress shows you “HTTP error” instead of the truth.

Common causes

How to fix HTTP error — step by step

The steps are ordered from fastest to most involved. Test the upload after each one — most people are fixed by step one or two.

  1. Shrink and rename the image, then retry. Open the photo in a free compressor like TinyPNG or Squoosh and get it under 2 MB and no wider than 1920 pixels — more than enough for any blog. Rename the file so it uses only lowercase letters, numbers, and hyphens (for example, sunset-beach-1.jpg instead of IMG_20261023_143022 (1).JPG). Then go to Media, then Add New and upload the new file. This alone fixes the error in the majority of cases, because the most common trigger is simply an image the server could not afford to process.
  2. Retry in a different browser or incognito window. Browser extensions, a stale cached session, or a half-finished earlier upload can all poison the media uploader in ways that look exactly like a server problem. Open a private/incognito window and try the same upload there. If it works, clear your normal browser’s cache and disable extensions one by one until you find the culprit.
  3. Deactivate media-related plugins one at a time. Go to Plugins, then Installed Plugins, and start with anything that touches images: image optimizers, lazy-load plugins, security plugins, and CDN integrations. Deactivate one, then retry the upload; if it works, you found the conflict. Either keep that plugin off, check its settings for an option that interferes with uploads, or contact the developer. When you are done testing, reactivate the plugins you turned off.
  4. Raise the PHP memory limit. Connect to your site and open wp-config.php in the root folder. Add define('WP_MEMORY_LIMIT', '256M'); just above the line that reads ‘That’s all, stop editing!’, then save. This gives WordPress more headroom for image processing. If you can edit server settings too, set memory_limit = 256M, upload_max_filesize = 64M, post_max_size = 64M, and max_execution_time = 300 in your php.ini. Recheck the upload — the memory error should be gone.
  5. Switch the image editor or limit Imagick. WordPress processes images with either Imagick or the GD library, preferring Imagick — whose multi-threaded processing trips resource limits on many shared hosts. The quickest fix is to force single-threaded Imagick: add SetEnv MAGICK_THREAD_LIMIT 1 to the .htaccess file in your site root. Prefer GD instead? Add a small filter to your theme’s functions.php that returns WP_Image_Editor_GD on the wp_image_editors hook. Retry the upload after either change and keep whichever one works.
  6. Check folder permissions and ask your host for help. Using FTP or your host’s file manager, confirm that wp-content/uploads and everything inside it uses 755 for folders and 644 for files — wrong permissions can make the upload fail at the last step. Then go to Tools, then Site Health, then Info, then Server and note your PHP version and memory limit; upgrade to a supported PHP version from your hosting panel if yours is outdated. Still failing? Open a support ticket and ask the host to raise the memory and upload limits and to check the server error log around the time of your failed upload — the log almost always names the real cause.

Did this fix it? Quick checklist

A word of caution before you edit server files: download a backup copy of wp-config.php, .htaccess, and functions.php to your computer first. A single typo in wp-config.php or .htaccess can take your whole site offline, and having the originals turns a disaster into a two-minute restore. Also, never edit functions.php code you do not understand into a theme that will be updated — use a child theme or a code-snippets plugin so an update does not wipe your fix.

Frequently asked questions

What does “HTTP error” mean when uploading images in WordPress?

It means the upload failed on the server side while WordPress was receiving or processing the image — not that your internet connection broke. WordPress uses “HTTP error” as a generic label for any failure in the media uploader: the file may be too large for the PHP memory limit, the image-processing library may have crashed, a plugin may be interfering, or the server may have timed out.

Why do phone photos fail but small screenshots upload fine?

A modern phone photo is 8 to 15 MB and WordPress needs several times that amount of RAM to open, rotate, and generate thumbnails from it. On shared hosting the PHP memory limit is often only 128 MB, so a big photo can exhaust it while a small screenshot sails through. Compressing the image before upload or raising the memory limit to 256 MB fixes this pattern.

Is it safe to raise the PHP memory limit?

Yes. Setting WP_MEMORY_LIMIT to 256M in wp-config.php only raises the ceiling on how much memory WordPress may use — it does not force the site to use more memory, and it has no effect on your visitors. It is one of the most common WordPress tweaks and is fully reversible by deleting the line.

I tried everything and the HTTP error still appears. What now?

Open a support ticket with your host and ask two things: raise the PHP memory and upload limits for your account, and check the server error log for the exact failure at the time of your upload. If you want to investigate yourself first, enable debugging in wp-config.php (WP_DEBUG set to true) and check the debug log — the real error is almost always recorded there, hidden behind the generic “HTTP error” label.