How to Fix WordPress Image Upload Errors
Find the exact message WordPress shows, then follow its fix: make the file smaller, save it as JPEG or PNG, or fix the uploads folder's permissions.
Applies to: cPanel WordPress Blue Arctic Shared Web Hosting (cPanel); WordPress 7.x
On this page
- “… exceeds the maximum upload size for this site.” or “The uploaded file exceeds the upload_max_filesize directive in php.ini.”
- “The server cannot process the image…”
- “The server cannot process HEIC images…” or “The web server cannot generate responsive image sizes for this image…”
- “Sorry, you are not allowed to upload this file type.” or “This file cannot be processed by the web server.”
- “Unable to create directory… Is its parent directory writable by the server?”
- “The uploaded file could not be moved to…” or “Failed to write file to disk.”
- “Unexpected response from the server…”
- How to tell it worked
- Troubleshooting
- Still need help?
When an upload to Media fails, WordPress shows a message. The message tells you the fix, so find yours below.
Note
Steps that use cPanel apply to Shared Web Hosting. If you have Managed WordPress Hosting, open a support ticket for those steps.
“… exceeds the maximum upload size for this site.” or “The uploaded file exceeds the upload_max_filesize directive in php.ini.”
The file is bigger than your hosting allows in one upload.
- Go to Media → Add Media File. Under the upload area, WordPress shows Maximum upload file size: and the limit.
- Make a copy of the image file first, so you keep the original. You can copy the file and paste it in the same folder.
- Make the copy smaller: set the larger of its width and height to 2560 pixels or less. On a Mac, open the copy in Preview and choose Tools → Adjust Size. On Windows, open the copy in your photo app and use its resize option.
- Check the copy’s size is under the limit from step 1, then upload it.
- If you need to upload bigger files, open a support ticket and tell us the size of the largest file you want to upload. See how to increase PHP limits.
“The server cannot process the image…”
The file uploaded, but the server ran out of time or memory creating the smaller copies WordPress makes of every image. WordPress suggests images no larger than 2560 pixels on the longest side.
- Go to Media → Library. If the image is there without a thumbnail, delete it.
- Make a smaller copy of the image, as in steps 2 and 3 of the section above, and upload the copy.
“The server cannot process HEIC images…” or “The web server cannot generate responsive image sizes for this image…”
The server can’t work with this image format. Photos from an iPhone often use a format called HEIC.
- Open the image in a photo app. Use its Save As or Export option to save it as JPEG (for photos) or PNG (for graphics). Renaming the file’s ending doesn’t change its format.
- Upload the new file.
Tip
On an iPhone, go to Settings → Camera → Formats and tap Most Compatible. New photos are then saved as JPEG.
“Sorry, you are not allowed to upload this file type.” or “This file cannot be processed by the web server.”
WordPress allows common image, audio, video and document formats only. Save the image as JPEG or PNG, as in the section above, and try again. Don’t install plugins that allow any file type; they let harmful files in too.
“Unable to create directory… Is its parent directory writable by the server?”
WordPress can’t write to its uploads folder. The message names the folder it couldn’t create.
Warning
Never set 777 on a folder. It lets anyone on the server write files there.
- Log in to cPanel, click Files in the sidebar and open the File Manager tab. If you see a File Manager icon instead, click it. Or type its name in cPanel’s search box (Ctrl+K or Cmd+K). If you can’t log in or can’t find File Manager, open a support ticket.
- Open
public_html(or the folder for this site), thenwp-content. - Select the
uploadsfolder and click Permissions. Folders should be755. - If it isn’t
755, change it to755and confirm. - If the message names a folder inside
uploads, openuploadsand check that folder the same way. - If the folders already show
755, your storage may be full: see the next section. If there’s nouploadsfolder, open a support ticket and paste the full error message.
“The uploaded file could not be moved to…” or “Failed to write file to disk.”
WordPress couldn’t save the file: the uploads folder isn’t writable, or your hosting storage is full.
- Check the
uploadsfolder’s permissions as above. - If they’re right, check your storage (see how to find large files and fix a full disk).
- Still stuck? Open a support ticket and paste the full error message.
“Unexpected response from the server…”
The upload may have worked. Reload Media → Library and check. If it isn’t there:
- Try a smaller copy of the image.
- Try another browser.
- If you use a plugin that shrinks or optimizes images, go to Plugins and click Deactivate under it. Try the upload, then click Activate to turn it back on. Don’t turn off security plugins; open a support ticket instead.
- If it still fails, see how to fix 403 and 500 errors.
How to tell it worked
The image appears in Media → Library with a thumbnail, and it shows on the page where you inserted it.
Troubleshooting
- The image uploads but looks old on the site: clear your cache (see how to clear your WordPress cache).
- All uploads fail since a move: check the uploads folder permissions as above. Then go to Settings → Media. If you see a Store uploads in this folder box, copy what it says into a support ticket. Don’t change it yourself.
- Thumbnails are missing for old images: they were created under older settings. A thumbnail-regeneration plugin can rebuild them. If you’re unsure, open a support ticket before you run one.
Still need help?
Open a support ticket from the Client Portal at my.bluearctic.com. Include your site address, the exact error message, the file’s size and format, a screenshot, and what you already tried. Never include a password.