How to Fix WordPress “HTTP Error” When Uploading Images
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
- The image is too big for the PHP memory limit: a 12 MB phone photo needs far more than 128 MB of RAM to process, and the server kills the job mid-upload when memory runs out.
- Imagick hits host resource limits: WordPress’s preferred image library uses multiple threads by default, and many shared hosts cap thread counts — the processing silently fails and you see the red notice.
- A plugin is interfering: image optimizers, security plugins, and CDN integrations hook into the media pipeline and can break the uploader, especially right after an update.
- Bad file names or damaged metadata: apostrophes, accents, emoji, and very long names in the file name — or corrupt EXIF data inside the image — can make the server-side processing fail outright.
- Low upload limits and short timeouts:
upload_max_filesize,post_max_size, andmax_execution_timeset below what the image needs will abort large uploads before they complete.
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.
- 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.jpginstead ofIMG_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. - 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.
- 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.
- Raise the PHP memory limit. Connect to your site and open
wp-config.phpin the root folder. Adddefine('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, setmemory_limit = 256M,upload_max_filesize = 64M,post_max_size = 64M, andmax_execution_time = 300in yourphp.ini. Recheck the upload — the memory error should be gone. - 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 1to the.htaccessfile in your site root. Prefer GD instead? Add a small filter to your theme’sfunctions.phpthat returnsWP_Image_Editor_GDon thewp_image_editorshook. Retry the upload after either change and keep whichever one works. - Check folder permissions and ask your host for help. Using FTP or your host’s file manager, confirm that
wp-content/uploadsand 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
- The same image now uploads cleanly in Media, then Add New and inside the block editor
- Full-size photos straight from your phone upload without the red HTTP error
- Tools, then Site Health, then Info, then Server shows a memory limit of 256M or higher
- Every plugin you deactivated while testing is turned back on — except the one that caused the conflict
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.