Usually, uploading pictures to WordPress is quite easy. You simply pick a picture and click on the Upload button; WordPress will upload it into your Media Library. At times, however, you might experience a problem in terms of an HTTP error, failure to upload, file size limit, or an instance where the picture uploads but fails to show up correctly.
These could be a result of many factors such as low PHP limits, wrong file permissions, lack of server capacity, lack of storage space, and plugins among other things.
Fortunately, most WordPress image upload problems can be diagnosed without rebuilding your website. Here is how to identify the most frequent causes behind WordPress image uploading and displaying issues and how to solve them.
Table of Contents
Why Won’t Pictures Upload to WordPress?
There is not one reason for the failure of images uploading in WordPress. This may happen at different levels of your site.
Reasons may be:
- The file size is more than the limit set by WordPress
- Insufficient PHP memory
- Too low upload_max_filesize or post_max_size
- Exceeded disk space of your hosting plan
- Inappropriate folder permissions
- Conflicts between plugins or themes
- Problems with browser and caching
- Problems with server configuration
- WordPress is not able to write into the uploads folder
- Image format not supported
- Temporary server or HTTP error
Before making any changes, find out exactly what the error message that WordPress shows is. An error will help direct you to a solution. Knowing the error will help fix media library issues.
Errors Leading to Rapid Diagnosis
Prior to making any changes in your WordPress settings or hosting, it is important that you determine the exact error that appears when you attempt to upload an image.
| The uploaded file exceeds the upload_max_filesize directive in php.ini | Image size is greater than the allowed upload size in PHP. Verify and increase upload_max_filesize and post_max_size. |
| The uploaded file could not be moved to wp-content/uploads | It indicates an issue with the permission/ownership of the WordPress uploads directory. Check whether the WordPress is allowed to write in the wp-content/uploads/ directory. |
| Unable to create directory | It usually denotes an issue with the permissions or ownership of the uploads directory. Verify the folder permissions first. |
| HTTP error | It is generally an error, which could be caused by PHP limitations, conflicts of plugins, issues with server settings, image processing issues, or other similar server problems. |
| The image uploads but does not display correctly | Look at the image URL, the image file permissions, if caching is involved, thumbnail generation and any conflicts of plugin and theme with other components. |
| The upload fails without displaying a clear error | Think about PHP limitations, available storage space in the server, browser caching, plugin, theme, and server logs. Your hosting service provider needs to investigate the server configuration settings. |
Steps to Fix WordPress Image Upload Errors
1. Check Image File Size
Firstly, check the size of the image you are trying to upload. There are upload limits on both WordPress and your hosting platform. If your image is larger than that limit, WordPress will not accept the image.
To see the maximum file size you can upload, go to:
Media → Add New
Using cPanel
- Access the cPanel through login or through the client’s panel of the hosting account.
- Go to Software.
- Select PHP version or MultiPHP INI Editor.
- Under the Options tab, select upload_max_filesize and post_max_size.
To check from WordPress
- Login into your WordPress dashboard.
- Click on “Media” and then click on “Add New” (or “Add Media File”).
- Look for the Maximum upload file size limit at the bottom of the upload page.
- Otherwise, you can click on “Tools,” “Site Health,” and the “Info” tab.
WordPress generally shows the maximum file size for upload. Read more on how to increase the upload limit on the server.
In case the picture is bigger than the maximum allowed size, then it must be resized or compressed prior to uploading it.
For instance, an image meant for use on a blog post should not be more than a few MBs. The other advantage of resizing large images is that it enhances the speed of the webpage.
2. Increase the PHP Upload and Memory Limits
Even when you don’t have big files, uploads may be impossible because your PHP is limiting the procedure somehow.
There are several PHP configurations that affect the uploads on WordPress:
- upload_max_filesize
- post_max_size
- memory limit
- max_execution_time
- max_input_time
Use these steps to increase PHP Upload and Memory Limits for HarmonWeb
Method 1: Using Select PHP Version (Preferred)
This is the conventional method used with HarmonWeb accounts using CloudLinux Selector.
- Login to your HarmonWeb cPanel/Plesk account
- Click on Select PHP Version under the Software menu
- Please note that in case of any error, make sure that your PHP version is not the native one
- Edit the parameters by choosing from the drop-down lists for the following commands:
memory_limit: This should be edited to be whatever limit you would like (such as 256M or 512M).
upload_max_filesize: This can be edited for increased file uploads (such as 128M or 256M).
post_max_size: This needs to be the same or greater than your upload_max_filesize.
- The values will save automatically
Method 2: Using MultiPHP INI Editor
In case you want to set it up according to each domain separately, you can use the INI editor.
- Login into your cPanel
- Find and select MultiPHP INI Editor from there
- Choose your particular Domain from the dropdown menu
- You need to locate the following settings and change them numerically
memory_limit upload_max_filesize post_max_size
- Press the Apply button below
Note: Rule of Sizing
While choosing these values, you should observe this order to prevent your scripts from crashing:
memory_limit > post_max_size > upload_max_filesize
For instance, if your requirement is 128MB upload size, you can configure like below:
upload_max_filesize = 128M
post_max_size = 256M
memory_limit = 512M
However, if you are not sure about the PHP values that your hosting account allows, then you need to contact your hosting provider.
3. Available Disk Storage on Hosting Account
Your WordPress website should have enough disk space available for storing image uploads.
As time passes, a lot of media files, backups, themes, and other files will take up space on your hosting account.
In case your hosting storage has been exceeded, WordPress may not be able to save new images.
How to Check Your Storage Space in cPanel
- Open up your cPanel account
- Go to the Statistics/General Information section in the sidebar on the right-hand side of the screen for the total picture
- Scroll down to Files and select Disk Usage
- Go through the disk usage information to find out how much space is being utilized by your website files, databases, mail accounts, etc.
To check for disk usage on cPanel on HarmonWeb:
- Access your cPanel account
- Go to Files from the list of options.
- Click on Disk Usage
- View your total disk usage, used space, and directory breakdown on the following page
If there isn’t sufficient space on your server, then you can delete some files along with those which are not necessary. Moreover, if you want to have more space, you can get upgraded hosting accounts.
4. Ensure Permissions on the Uploads Folder
WordPress must have the permission to upload the files into the uploads folder.
Generally, the uploaded files are stored in:
wp-content/uploads/
When there are incorrect permissions on the folder, WordPress will fail to add any new files. One typical setting is:
- Right-click the uploads folder (or click the folder and go to the top bar to click Permissions) and select Change Permissions
- Enter the value as 755
- Set the checkboxes like this:
User: Read, Write, Execute
Group: Read, Execute
World: Read, Execute
- Click on Change Permissions to apply
- If there are any problems with the media files inside, right-click the uploads folder, select the contents, and set it to 644
- Right-click the uploads folder (or click the folder and go to the top bar to click Permissions) and select Change Permissions.
- Enter the value as 755.
- Set the checkboxes like this:
User: Read, Write, Execute
Group: Read, Execute
World: Read, Execute
- Click on Change Permissions to apply.
If there are any problems with the media files inside, right-click the uploads folder, select the contents, and set it to 644. A common set-up is one of 755 for folders and 644 for files, however the right set of permissions will depend upon the settings of your server and PHP.”
Do not set everything to 777 just because you cannot upload files. This will cause security issues.
5. Check “Failed to Write File to Disk” Error
When WordPress displays:
“Upload: Failed to write file to disk.”
The issue is typically associated with writing the file to the server.
The reasons could be:
- Improper directory permissions
- Full temporary directory
- Lack of sufficient space on the server
- Problems with file/folder ownership
- Restrictions from the server side
Do not try the same upload again and again without finding out the cause of the error. See how you can correct this error.
6. Watch for HTTP Error While You Upload Images
Another WordPress Media Library issue you might encounter is the “HTTP error.”
This error message usually shows up during the process when WordPress tries to upload your image.
It can have many possible causes, and they can range from PHP resource issues to image processing problems.
First thing that needs to be done is to refresh the page and upload image again. If the image continues to fail, use a smaller image. Try uploading an entirely new image.
This will be helpful since it will let you know whether the issue is specific to that single image or to any images uploaded through WordPress. Keep reading about how to correct this mistake.
7. Examine The Image Format
WordPress allows specific file formats for security purposes only.
Image formats like:
- JPG/JPEG
- PNG
- GIF
- WebP
are usually allowed in modern-day WordPress websites.
In case you are trying to upload an uncommon image format which is not permitted by WordPress, then the problem might not be associated with your server at all. In this case, WordPress could possibly be preventing the use of this format.
This issue is discussed by HarmonWeb on its troubleshooting page for the “error fixing the “Sorry, this file type is not permitted for security reasons” error.”
8. Check Your Hosting Server
In case you have verified image size, PHP settings, permissions, plug-ins, disk storage, and still find the issue persists, then it may lie on the server side.
Your hosting company should examine the following for your site:
- PHP settings
- Server error logs
- Disk quotas
- Temporary directories
- File ownership
This becomes more critical when all images fail to upload and not just a single image. Another way to tell if you have hit your quota limit is by having a hosting company check on your behalf.
How to Avoid Issues With WordPress Image Uploading
To avoid such issues in the future, here is what you can do:
- Compress big images before uploading
- Ensure that all updates are made to WordPress and its plugins and themes
- Ensure that there is enough storage in your host
- Make backups of your website regularly
- Set your PHP limits according to your website’s requirements
- Ensure your WordPress hosting is reliable
- Check your hosting resource usage
Even large, unoptimized images may pose problems to website performance in case of successful uploading, which means that preparing your media before uploading can be quite useful.
Conclusion
WordPress images upload errors may simply be caused by the use of an image that is too large or problems with the browser itself, although sometimes the error is due to server configuration.
First check for the simpler issues, such as image dimensions, image format, browser cache and available disk space. If that does not solve the problem, look into server limitations, file permissions, plug-ins and your hosting environment.
Images Still Not Uploading?
Even if your WordPress website is failing to upload images due to the right file format and acceptable image size, there is every possibility that the underlying reason behind this problem is low PHP limits and storage/server settings.
Find out about HarmonWeb hosting, and enjoy access to the server resources and support necessary for maintaining your WordPress site.


