The HTTP error in WordPress is not an HTTP status code the server returns; it is a generic failure message WordPress shows when the browser uploads a file to the media library and something between the browser and PHP interrupts the transfer. In most cases it is fixable without touching any code: raise the upload limits in PHP, switch the image editor away from the PHP GD library for that upload, or upload over SFTP and regenerate thumbnails. Start with the simplest change — increase the memory and upload limits — then work down the list until the error clears.

What You'll Need

  • WordPress administrator access (the ability to install plugins and edit themes or files).
  • Access to your hosting control panel (cPanel, Plesk, or your host's dashboard) or SFTP/FTP credentials — some fixes require editing a PHP configuration file or an .htaccess file.
  • A backup of the database and the wp-content folder before you change any files. Uploading a database dump or copying the folder is enough; you do not need a commercial backup plugin, but it makes restoring faster if a change breaks the site.
  • The image you are trying to upload, ideally renamed to something short and without spaces, accents, or special characters.
  • Optional but useful: a staging copy of the site, if your host offers one, so you can test configuration changes before applying them to the live site.

Step-by-Step

  1. Reproduce the error and note the file. Try uploading the exact image that fails and also a small, plain JPEG (a few hundred kilobytes). If the small file uploads, the problem is almost certainly a size or resource limit. If every file fails, the cause is more likely permissions, a plugin conflict, or a server configuration issue. Menu labels differ slightly between WordPress versions, hosts and regions, so treat the names below as a guide rather than exact wording.
  2. Increase the PHP upload and memory limits. This resolves the majority of HTTP errors. In your hosting control panel, open the PHP settings for the site (often labelled “Select PHP Version” or “MultiPHP INI Editor”). Raise upload_max_filesize to at least 64M, post_max_size to at least 64M, memory_limit to at least 256M, and max_execution_time to 300. Save, then retry the upload. If your host does not expose these settings, add them to a php.ini file in the WordPress root directory, or ask support to raise them for you.
  3. Confirm the limits actually changed. Open WordPress admin and go to Tools > Site Health, then the Info tab, and expand the Server section. It lists the current PHP limits. If the values still show the old numbers, your host is overriding the file you edited — a host-level pool configuration usually needs to be changed by support. Do this before spending time on other steps, because every other fix will fail while the limits remain low.
  4. Reduce the image size before uploading. A quick workaround: open the image in any photo editor, resize the longest edge to around 2500 pixels and save as JPEG at high quality, or export an image under 2 MB. Upload that version. If it succeeds, the original was simply too large for your current limits, and the fix is either the limit change above or a consistent workflow of resizing before upload.
  5. Try the browser uploader to rule out the block editor. Go to Media > Add New. The media library screen uses the standard browser upload form rather than the block editor's uploader. If the file loads there, the problem is in the editor or a plugin interfering with the editor's upload process, not the server. In that case, deactivate plugins one at a time and retry in the editor to find the culprit.
  6. Test for a plugin or theme conflict. Deactivate all plugins except the ones essential to the upload (if any), then try uploading. If it works, reactivate them one at a time, testing after each, until the error returns — the last one reactivated is the cause. If deactivating plugins changes nothing, switch temporarily to a default theme such as Twenty Twenty-Four and retry. Remember to reactivate your plugins and theme afterwards.
  7. Check file and folder permissions. The uploads folder needs to be writable by the web server. Connect over SFTP and look at wp-content/uploads. Directories should typically be 755 and files 644; the uploads folder should be owned or writable by the user PHP runs as. If uploads is set to 700 or owned by the wrong user, WordPress cannot write the file and may report an error after the transfer. Change permissions carefully and change them back if the site starts returning 500 errors.
  8. Add a mod_security exclusion if your host uses it. Some hosts run a web application firewall rule that blocks image uploads because of how the request is formed. Ask your host whether mod_security is active and whether it is logging blocks matching your upload. If so, request an exclusion for the media upload endpoint. Do not disable the firewall yourself on a shared host; ask support.
  9. Upload over SFTP and regenerate thumbnails. If nothing else works and you need the image live now, upload the file directly with SFTP into wp-content/uploads for the current year and month folder, then install an image regeneration plugin from the official WordPress plugin directory and regenerate the thumbnails so the media library references the new sizes. Be aware that the file will not be registered in the media library as a normal attachment unless you use a plugin whose documented purpose is importing files from the server.
  10. As a last resort, switch the image editor. If the upload completes but WordPress fails while creating the thumbnail sizes, the PHP GD library may be running out of memory on that image. Ask your host whether the Imagick PHP extension is available. If it is, follow the host's guidance for making Imagick available to WordPress, and confirm the change with a test upload of the original file.

Common Mistakes

The most frequent mistake is changing the limits in a file the host ignores. Many shared hosts set PHP values in a pool configuration outside your account and override .htaccess or php.ini entries. Always verify with Tools > Site Health that the new values are visible before concluding the limits are not the problem.

Another common error is setting post_max_size lower than upload_max_filesize. The post size must be larger than the file size because the request includes form overhead, so a 64M upload limit with a 32M post limit will still fail.

People also disable security plugins wholesale and leave them off. Deactivate for testing only, and reactivate every plugin when you are done. Equally risky is setting the uploads folder to 777 permissions “to be safe” — that lets anyone on the server write there and is not necessary on a correctly configured host.

Finally, do not assume the file is fine because it opens on your computer. Corrupt files, files with unusual characters in the name, and files whose real format does not match the extension (a .jpg that is actually a TIFF, for example) can all trigger failures. Re-export the image and try again.

Tips

  • Keep a consistent pre-upload habit: resize to a sensible maximum dimension, save as JPEG or PNG, and use only letters, numbers and hyphens in the file name.
  • If your host offers staging, test limit changes there first so you do not interrupt a live site.
  • Note what you change and where, including the setting names and old values. Hosts occasionally reset PHP settings during migrations or upgrades, and the error can reappear months later.
  • If the site has a caching layer or CDN, purge it after changing server settings, though it rarely affects uploads directly.

Troubleshooting

The error persists and Site Health shows old limits. Your host controls PHP configuration. Submit a support ticket naming the exact settings you need raised and ask them to confirm the change on the pool your site uses.

Uploads work in the media library but not in the editor. The server limits are fine; the problem is in the editor environment. Test with all plugins off, then reactivate one by one. This is also worth checking if the error appears only for a particular user role.

The upload completes, then the image is missing from the library. This usually points to a failed write to disk or a permissions problem on the uploads folder, or to a plugin that filters media uploads. Check for error logs in the hosting panel — they usually name the exact failure.

The site returns a 500 error after your changes. You have most likely mistyped a directive in .htaccess or a PHP file. Restore the file from your backup immediately, then reapply the change carefully.

Only very large photos fail. That is a size limit, even when the message simply says HTTP error. Resize before uploading or raise the limits as described above.

Frequently Asked Questions

Is the HTTP error the same as a 403 or 404?

No. A 403 or 404 is a specific server response you can look up. The generic HTTP error in the media library is WordPress's own message when the upload request fails outside a normal HTTP response, most often because PHP hit a size, memory or time limit.

Will increasing PHP limits slow my site?

Higher memory and execution time limits only let PHP use more resources; they do not consume them until needed. They are a ceiling, not a running cost. Set them to sensible values rather than unlimited.

Does this happen on every host?

No. Some hosts already set generous upload limits and never show the error. Others, particularly low-cost shared plans, set conservative values by default.

Can I fix it without touching any files?

Yes, in many cases. Resizing the image before upload is a working fix with no file changes at all, and your host can raise limits for you from their side if you ask.

Do I need FTP for the last-resort steps?

The SFTP upload and thumbnail regeneration path does require file access, but they are optional. Exhaust the limit and conflict checks first — they solve the overwhelming majority of cases.