How to fix uploads that keep failing
A stuck progress bar or a rejected file could be five different things — here is how to work out which one you actually have.
A failed upload can mean several genuinely different things depending on exactly how it fails — a rejected file before it even starts, a progress bar that stalls partway, or a generic error after what looked like a successful transfer. Each of those points at a different one of five common causes, and working out which kind of failure you have narrows things down immediately.
The causes, in the order worth checking
1. The file is larger than the server allows
Two separate PHP settings control this, and both have to allow the file, not just one:
| Setting | Controls |
|---|---|
upload_max_filesize | The largest single file PHP will accept |
post_max_size | The largest total request PHP will accept, including the file plus any other form data |
post_max_size must be set equal to or larger than upload_max_filesize — if it isn't, uploads fail silently at whichever limit is smaller, regardless of how generously the other one is configured. Both are usually adjustable in the PHP settings section of your control panel:
upload_max_filesize = 64M
post_max_size = 64M
WordPress specifically shows its current effective limit at the bottom of the media upload screen, which tells you immediately what the site currently believes the ceiling is, without needing to check server configuration directly.
2. The destination folder isn't writable
The folder uploads are being saved into needs to be writable by the web server process. On WordPress this is wp-content/uploads; on other applications it varies but is usually named something similar. Check the permission is set to 755 — never 777, which is both unnecessary and a security risk — and confirm the folder is owned by the correct account rather than having been created by a different process during a migration or restore.
3. The account has run out of disk space
An upload that appears to start and then fails partway, or fails with a generic server error rather than a clear size-limit message, can mean there simply isn't room left to write the file. Check the resource usage or disk space section of your control panel — this is easy to overlook because the error it produces rarely mentions storage directly.
4. A large upload is timing out before it finishes processing
Uploading is often only the first half of the work — image resizing, virus scanning, or generating thumbnails afterwards can take longer than PHP's execution time limit allows, particularly for large image or video files. This shows up as an upload that appears to complete and then returns a generic error, rather than being rejected outright. See fixing "maximum execution time exceeded" if this matches what you're seeing.
5. A file type is being deliberately blocked
Security configuration on most hosting deliberately blocks uploading certain file types through public-facing forms — executable scripts disguised with an image extension being the obvious risk this guards against. This is correct, intentional behaviour rather than a fault, but it can also catch legitimate file types that aren't enabled by default, such as SVG or certain video formats, which sometimes need to be specifically allowed rather than being blocked outright. If the file type is one you're confident should be permitted, that's a configuration change worth making deliberately rather than working around.
A generic "upload failed" message on screen often has a more specific error sitting in the browser's developer console or network tab — including the exact HTTP status code returned, which narrows down which of the causes above you're actually looking at rather than working through all five in order.
WordPress specifically: "HTTP error" during upload
This particular generic message on WordPress covers most of the causes above but is also sometimes caused by a plugin conflict during image processing, or by the server briefly running low on available memory during resizing. Temporarily raising the memory limit, as covered in fixing "allowed memory size exhausted", resolves this specific case more often than the wording of the error would suggest.
If none of that identifies it
Note the exact file size and type that fails, the exact wording of any error shown, and whether it fails immediately or partway through. With those details, support can check the relevant limits and logs directly rather than working through the list from scratch.
Frequently asked questions
Why does one file upload fine and another almost identical one fail?
This nearly always points at file size rather than anything about the file's content. Check the exact size of the file that fails against the one that succeeds — if it's meaningfully larger, it may simply be sitting just above a limit that the smaller file sits comfortably under.
Is it safe to just raise every upload limit as high as possible?
Raising upload_max_filesize without also raising post_max_size to match does nothing, since the smaller of the two always wins. Beyond that, an unusually high limit mostly just delays a timeout for a file that was always going to be too large to process comfortably — matching the limit to what you actually need to upload is more useful than maximising it.
Related reading
A page full of broken image icons could be a wrong path, a permission, or a blocked request — here is how to tell them apart.
How to fix a 500 internal server errorThe least informative error on the web. The real message is always in a log — here is how to find it and what it usually says.
How to fix "maximum execution time exceeded"A script ran for longer than PHP allows and was stopped mid-task — here is how to give it more time, or find out why it needed it.
How to fix "Error establishing a database connection"A blank page with one line of text, and five possible causes. Here is how to tell which one you have, in the order worth checking.