How to Fix Image Upload Issues in WordPress
If you're encountering problems uploading images, it’s often due to permission settings, file size limitations, or PHP configurations. Here's how to troubleshoot and resolve common issues.
1. File Permissions Issues
Incorrect file permissions on the uploads directory are a common cause for upload failures.
Fix: Correct Folder Permissions
- Access cPanel → File Manager → navigate to
wp-content/uploads/. - Set directory permissions to 755 for folders and 644 for files.
Command Line Fix (SSH)
find /home/your_user/public_html/wp-content/uploads/ -type d -exec chmod 755 {} \;
find /home/your_user/public_html/wp-content/uploads/ -type f -exec chmod 644 {} \;Two commands, because folders and files need different permissions. Running chmod -R 755 over the whole directory would make every image executable as well as readable, which you do not want in a folder the web server can write to.
2. Exceeded Maximum Upload File Size
Your hosting environment might restrict the maximum file upload size, which causes failures for large images.
Fix: Increase Max File Upload Size
- Log into cPanel → Select PHP Version → Click Options. See our guide on changing your PHP version, extensions and options if you have not used this screen before.
- Check
upload_max_filesizeandpost_max_size. On Krystal shared hosting these are usually already 512M, which is far larger than any normal image - so if you see those values, your upload is failing for one of the other reasons below and there is nothing to change here. Do not lower them.- If they have been reduced at some point, put them back up, and check
max_execution_timeandmax_input_timeare set sensibly (300 is plenty).
- If they have been reduced at some point, put them back up, and check
3. PHP Memory Limit Exceeded
Insufficient PHP memory can cause uploads to fail, especially for large files or when the server is under load.
Fix: Increase PHP Memory Limit
- In cPanel → Select PHP Version → Options, check
memory_limit. It is normally 256M on Krystal shared hosting; raise it to 512M if you are working with very large images and you are still seeing failures.
4. Incorrect File Formats
WordPress supports JPG, PNG and GIF, and has also supported WebP since version 5.8 and AVIF since 6.5. If a WebP or AVIF file is refused, that is usually the server's image library rather than WordPress - check Tools → Site Health → Info → Media Handling to see which formats your site can actually process. SVG uploads are a different matter: they are blocked by default because an SVG can carry scripts.
Fix: Convert or Enable SVG Uploads
- For unsupported file types (e.g., SVG), use the Safe SVG plugin, which sanitises them first.
- Alternatively, convert files to supported formats like PNG or JPG.
5. Temporary Folder Missing
In certain cases, missing or inaccessible temporary folders can block uploads.
Fix: Define a Temporary Directory
Add the following to your wp-config.php:
define('WP_TEMP_DIR', '/home/your_user/public_html/wp-content/temp/');Ensure the temp directory exists and is set to 755.
6. Browser Cache Issues
Sometimes, issues may arise from cached content preventing you from seeing uploaded files.
Fix: Clear Browser Cache
Clear your browser cache or check in a different browser or incognito mode.
7. LiteSpeed Caching Conflicts
LiteSpeed Cache can sometimes interfere with the upload process.
Fix: Purge LiteSpeed Cache
- From your WordPress dashboard, go to LiteSpeed Cache → Toolbox → Purge All to clear the cache. If you do not have the plugin, our guide on installing the LiteSpeed cache plugin covers it.
- Also ensure object cache settings in LiteSpeed don’t conflict with uploads.
8. Plugin or Theme Conflicts
Sometimes a plugin or theme can cause upload errors, particularly if outdated or incompatible.
Fix: Disable Plugins or Switch Theme
- Disable all plugins temporarily and try uploading.
- If successful, re-enable them one by one to identify the culprit.
- If plugins are not the issue, switch to a default WordPress theme (Twenty Twenty-Five, or whichever ships with your version) and test again.
9. Permissions and Security Modules
Ensure that server security modules (such as ModSecurity) aren't blocking the upload process.
Fix: Disable ModSecurity Temporarily
- In cPanel, locate ModSecurity.
- Temporarily disable it for the domain and attempt the upload again.
- If this resolves the issue, adjust the security rules to allow uploads without blocking.