HTTP error (media upload) 📝 WordPress

WordPress Media: “HTTP error.” when uploading images

The upload request failed on the server — memory or timeout during image processing, upload size limits, ModSecurity, or Imagick issues.

Seen on: WordPress

Meaning

The generic “HTTP error.” hides a server response like 500/413/403. Large images trigger memory/time limits while generating sizes; Imagick with limited threads/resources can crash.

Common causes

  • PHP memory/time limit while resizing large images
  • Upload size limits (upload_max_filesize, Nginx client_max_body_size)
  • ModSecurity/WAF blocking the upload
  • Imagick resource issues

⚡ Quick fix

  1. Check the browser network tab and server logs for the real status
  2. Raise memory_limit/max_execution_time and size limits
  3. Try switching the image editor to GD (filter wp_image_editors)

Detailed fix by platform

WordPress

  1. add_filter('wp_image_editors', fn() => ['WP_Image_Editor_GD', 'WP_Image_Editor_Imagick']);

PHP

  1. php
    ; php.ini
    memory_limit = 256M
    upload_max_filesize = 64M
    post_max_size = 64M
    max_execution_time = 120

How to diagnose

  1. Status — Network tab response code
  2. Logs — PHP/Nginx error log
  3. Size — Image dimensions/megapixels

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.