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
- Wait and retry. Temporary server load can cause a one-off failure.
- Rename the file to plain lowercase letters, numbers and hyphens, such as
team-photo.jpg. Remove apostrophes and accents. - Make the image smaller. Resize huge photos to 2560 px on the longest side before uploading.
- Try another browser and log out and in again.
Server-side fixes
- Raise memory. Add
define( 'WP_MEMORY_LIMIT', '256M' );towp-config.phpand raisememory_limitin cPanel’s MultiPHP INI Editor. - Check upload limits.
upload_max_filesizeandpost_max_sizemust be larger than the file. - Check permissions.
wp-content/uploadsshould be755and writable by the web server. - 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' ] );
- 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.