HTTP error during media upload in WordPress – causes and solutions

The “HTTP error” when uploading media is vague and frustrating, but usually fixable with a few targeted checks.

You may know the feeling: you try to add an image via the WordPress media library, and instead of a happy thumbnail you get a cryptic message: “HTTP error”. That’s frustrating—why isn’t it working? Don’t panic. I’ve seen this vague error often, and it’s almost always solvable. Below I explain calmly and step by step what the HTTP error means and how you can fix it.

When WordPress has an upload problem it sometimes only shows the non‑specific message “HTTP error”, without details. That causes confusion: you can see that something went wrong, but not why. That’s exactly what makes it tricky. Fortunately there are a number of common causes. I’ll go through them below—with concrete fixes—so you can upload images again without errors.

What does the “HTTP error” mean when uploading?

The “HTTP error” message in WordPress is a generic error indicator that appears when something goes wrong while uploading a file to the media library. In practice it means the server did not return a proper response—usually an HTTP status code in the 400 or 500 range (for example an internal server error). WordPress does not show the exact technical error; you only see the generic “HTTP error”.

In other words: something goes wrong between your browser and the server during the upload, but WordPress doesn’t specify what. This can happen when uploading an image, video, or PDF. Because the message is so unspecific, you need to check multiple possible causes to find the real culprit.

When do you see this error? Usually right after you try to upload a media file. You select an image, it seems to load, and then suddenly “HTTP error” appears in the upload box. It can be occasional (due to a temporary hiccup) or persistent every time you try to add a certain file. Below I cover the most common causes and how to fix them.

Causes and fixes for the HTTP error on uploads

Because “HTTP error” is a catch‑all message, multiple scenarios can cause it. Here are the main causes and their solutions. Work through them—you’ll often discover which one applies as you go.

1. A problem with the file itself (name, type, or size)

One of the first things to check is the file you’re trying to upload. Does it only fail with one specific image? Then the file may be the issue. Common sub‑causes:

  • File name contains unusual characters: WordPress can struggle with special characters in file names. Characters like $, &, #, as well as accented letters (é, ü) or apostrophes can cause upload problems. Solution: rename the image to a simple name (letters, numbers, dashes, or underscores only). Try again. Many users report the error disappears after removing apostrophes from the file name.
  • Unsupported file type: are you using a file type WordPress doesn’t recognize? By default WordPress supports common formats (JPG, PNG, GIF, PDF, etc.). Newer types like WebP are supported only since WordPress 5.8 (2021). WebP is a modern image format from Google that is ~30% smaller than JPEG/PNG on average. If you’re on a very old WordPress version, uploading WebP can fail. If your server software doesn’t support WebP, you’ll also get an error. Solution: convert the image to a more common format (e.g., .jpg or .png) or update WordPress to a recent version that supports WebP. For other file types, check WordPress documentation or use a plugin that allows extra mime types.
  • File is (too) large: a common cause is simply that the image is too large—either in pixel dimensions or file size. If an image has a huge resolution (e.g., straight from a camera) or is tens of MBs, the upload can fail. WordPress or the server may stop processing without a clear message. Hosts also often set an upload limit (on cheap plans sometimes only 2 or 8 MB). If your file exceeds that, you may see an HTTP error or a “file too large” message. Solutions: resize the image before uploading (crop or reduce resolution) and compress the file (for example via tinypng.com). Also check PHP settings like upload_max_filesize and post_max_size, which control the maximum upload size. You can increase these in a PHP settings file (php.ini) or via your hosting control panel. On shared hosting they’re often low, so a small increase (to e.g. 32M or 64M) can help.

In short: start with the file itself. Rename it with simple characters, try another format, and make sure it isn’t absurdly large. If the upload still fails, the problem likely isn’t only the file—keep reading.

2. Temporary glitch or browser issue

Sometimes nothing is structurally wrong—you just hit a temporary hiccup. For example, the server was too busy at the moment of upload or your internet connection briefly stalled. In that case an upload can fail even though nothing is wrong with the file or the site. My advice is to wait a few minutes and try again. Surprisingly often the error is a one‑off and the second attempt succeeds.

Your browser can also be the culprit. There are reports that Google Chrome in particular sometimes shows this HTTP error during uploads, while another browser works fine. Solution: switch browsers for a test—try Firefox, Safari, or Edge and see if the upload works there. It can also help to clear your browser cache, so you’re not seeing an old error that’s already resolved. It’s rare that caching blocks uploads, but it’s worth ruling out.

In short, rule out a temporary or local issue. Trying again (with a short pause) or using another browser can show whether the error is structural. If it works elsewhere, the issue may be your first browser (extensions or cache). If it fails everywhere, other factors are at play.

3. Plugin conflict or theme issue

Does your WordPress site run many plugins? Then there’s a real chance a plugin conflict is causing the HTTP error. In practice I often see issues with image optimization plugins—plugins that resize or optimize images on upload—because they can hang and disrupt the upload. But other plugins (for example security plugins or custom media library plugins) can also interfere.

The approach here: temporarily deactivate plugins one by one and test uploads each time. Start with plugins related to media or uploads. If the HTTP error disappears after disabling a specific plugin, you’ve found the culprit. Solution: check if there’s an update for that plugin (maybe it’s a known bug fixed in a newer version). You can also contact the plugin author to report the issue. In the meantime, leave the plugin disabled or find an alternative that offers similar functionality without the upload error.

Besides plugins, your theme can in rare cases play a role. For example if your theme adds image functionality (like special gallery features) that interferes with the media library. If the HTTP error started right after installing or updating a theme, try temporarily switching to a default WordPress theme (e.g., Twenty Twenty‑One). Upload an image again. If it works, the theme is to blame. In that case contact the theme developer or consider moving to a more stable theme. Theme conflicts are less common than plugin issues, but it’s worth ruling out.

4. Hosting limitations (memory, server settings)

Many HTTP errors during uploads stem from server‑side limitations—especially on budget hosting plans. Cheap hosting often has strict limits (low memory, slow processing) to keep costs down. When uploading images you can quickly hit those limits. Technical causes and fixes:

  • Too little PHP memory: WordPress has a certain memory limit (memory_limit). If an upload (especially a large image) needs more memory—e.g., when generating thumbnails—the process can stop early. Result: the server returns an error and you see “HTTP error”. Solution: increase the PHP memory limit for WordPress. Add this line to wp-config.php (preferably just above /* That's all, stop editing! */):
define('WP_MEMORY_LIMIT', '256M');

This asks WordPress to use up to 256 MB instead of the default (often 64M or 128M). Tip: 256M is a safe value; not all hosts allow unlimited memory, so don’t go higher than needed. Save the file and try the upload again. If it works, memory was the bottleneck. If not, remove the line or keep it—it won’t hurt, but the cause lies elsewhere.

  • Imagick issues (image processing): behind the scenes WordPress uses a PHP library to resize images, usually Imagick or sometimes GD. Imagick is powerful but can consume a lot of resources (CPU, memory) and uses multiple threads. On shared hosting, providers often limit the number of threads Imagick can use, or Imagick itself hits limits. This can trigger the HTTP error. A known solution is to make Imagick less resource‑hungry in one of two ways:

    • Force GD instead of Imagick: by adding a code snippet in functions.php, you can make WordPress prefer the GD Library. GD is less memory‑intensive. Add this function to your theme’s functions.php:
function wp_image_editors_override( $editors ) {
    $gd_editor = 'WP_Image_Editor_GD';
    $editors = array_diff( $editors, array( $gd_editor ) );
    array_unshift( $editors, $gd_editor );
    return $editors;
}
add_filter( 'wp_image_editors', 'wp_image_editors_override' );

Now the GD editor is used first for image editing. Test the upload again. If it works, Imagick was the culprit. (Note: if you put this in a theme, a theme update could overwrite it—use a child theme or custom plugin for such code.)

  • Limit Imagick’s thread usage via .htaccess: you can tell the server to run Imagick in single‑thread mode. Open the .htaccess file in the root of your WordPress install (via FTP or your host’s file manager) and add this line, for example at the bottom:
SetEnv MAGICK_THREAD_LIMIT 1

This forces Imagick to use only one thread, which often prevents it from overloading budget hosts. Save the file and try uploading again. In many cases this fixes an HTTP error caused by Imagick. (Technical note: some hosts don’t allow this change; if so, ask whether they can adjust server settings or limit the Imagick module.)

  • Maximum upload size / execution time: I already mentioned the PHP setting upload_max_filesize. There’s also post_max_size (should be equal or larger than upload_max) and max_execution_time (how long a script can run). For large media uploads, you may need to increase these values. For example, set limits to 64M and execution time to 300 seconds for processing large images. You can do this via an .htaccess addition or in a php.ini:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300

Not every host lets you adjust this yourself; if not, ask support. On shared hosting these defaults are low, which can cause errors during heavy image uploads.

  • Outdated PHP version: a less common but relevant cause is running an old PHP version that doesn’t handle modern formats or WordPress functions well. WordPress has required at least PHP 5.2.4 since version 3.2, but today I recommend PHP 8.x for speed and compatibility. If your host is on a very old PHP version, you can get strange errors, including upload issues. Solution: upgrade to a recent PHP version via the hosting panel or ask the host to do it. Consider switching hosting if they don’t keep such basics up to date. Modern WordPress hosting keeps PHP current, which prevents these issues.

5. File permissions or server permissions

Although the HTTP error usually comes from the factors above, file permissions deserve a quick mention. If WordPress doesn’t have write permissions on the uploads folder (wp-content/uploads), it can’t save files. In that case you often see a specific message like “Unable to create directory wp-content/uploads/...” or “Is its parent directory writable by the server?”. That’s not the same HTTP error message, but it does cause uploads to fail. So if the error persists, check that your disk isn’t full and that the wp-content/uploads folder has the correct permissions (usually 755 for directories). Especially after migrating hosting or restoring files manually, permissions can be wrong. Fix them via FTP or your hosting control panel (set correct permissions and ensure files are owned by the web server user). After that, uploads should work normally.

Wrap‑up: problem solved (or ask for help)

An HTTP error when uploading media can be alarming, but as you can see there are many logical causes and therefore solutions. Work through the scenarios above calmly. In most cases you’ll find the culprit: whether it’s a file that’s too large, a plugin conflict, or a server limit—you can rule out the causes step by step. Usually you’ll fix the problem quickly and can upload images without errors again.

Want this to stop being your problem?

If outages or errors keep repeating, the fix is often consistency: updates, backups and monitoring that don’t get skipped.

See managed WordPress hosting