Skip to content

Tutorials WordPress Beginner1 min read

How to Fix the WordPress 'HTTP Error' When Uploading Images

Fix the generic HTTP error in the WordPress media uploader: file size and name, memory, PHP image library, permissions and security rules.

By ZSOLNET Editorial Team Updated

Key takeaways

  • The media uploader shows 'HTTP error' for several different underlying problems.
  • Try a smaller image with a simple file name first.
  • Memory limits and folder permissions cause most persistent cases.

The WordPress media library shows a bare HTTP error when the upload request fails on the server. Work through these checks in order.

Quick checks

  1. Wait and retry. Temporary server load can cause a one-off failure.
  2. Rename the file to plain lowercase letters, numbers and hyphens, such as team-photo.jpg. Remove apostrophes and accents.
  3. Make the image smaller. Resize huge photos to 2560 px on the longest side before uploading.
  4. Try another browser and log out and in again.

Server-side fixes

  1. Raise memory. Add define( 'WP_MEMORY_LIMIT', '256M' ); to wp-config.php and raise memory_limit in cPanel’s MultiPHP INI Editor.
  2. Check upload limits. upload_max_filesize and post_max_size must be larger than the file.
  3. Check permissions. wp-content/uploads should be 755 and writable by the web server.
  4. Switch image library. Some servers have problems with Imagick. Ask WordPress to prefer GD by adding this to a small must-use plugin:
<?php
add_filter( 'wp_image_editors', fn() => [ 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ] );
  1. Check security rules. A web application firewall may block the upload. Look in your security plugin’s log or ask your host.

Frequently asked questions

Why does it only fail for large images?

WordPress creates several resized copies of each image, which takes memory. Very large photos (over about 25 megapixels) can exceed the memory limit. Resize before uploading.

What permissions should wp-content/uploads have?

Folders 755 and files 644 on most hosting. Never use 777.

Share X LinkedIn Facebook

Log in to your account

Manage your domains, hosting and invoices in one place.

Secure connection straight to the ZSOLNET client area.

No account yet?