Articles on: WordPress

How To Fix The Image Upload Error In WordPress

Image upload errors in WordPress can be very frustrating!

Some of the most common include memory limit exhausted, image size exceeds upload limit, and a general http error.

Thankfully the majority of these can be solved without having to make any edits to the code of your website.

Increase PHP Limits



The first step to troubleshooting these errors is to login to cPanel and increase your PHP limits.

You can do this by going to cPanel-> Select PHP Version -> Switch To PHP Options:






Personally, I like to set my memorylimit to at least 128M_, my postmax_size to at least 32M_, and my uploadmax_filesize to at least 32M_.

You can go higher, but most of the time these will solve 99% of the upload issues you're having.

Make Sure You're Using PHP 7+



PHP 7+ is the default on all our new servers, but if you're not already using PHP 7, make sure to set your website to do so:

cPanel -> Select PHP Version -> 7.4 (at least):



Older version of PHP can cause image uploads to fail, so it's always best to use the latest. With the major performance benefits, you definitely want to use at least PHP 7.4 (if not PHP 8+).

At Name Hero, we provide many of these options.

Check Your Uploads Folder Permissions



If you've installed WordPress using the auto-installer in cPanel, this shouldn't be an issue.

However, if you've migrated your website over, or have manually installed WordPress, you may need to check the permissions on your uploads folder.

To do this you want to go to cPanel -> File Manager -> Navigate To "uploads" inside the wp-content folder.

You then want to right click, Change Permissions and make sure it is set to 755:



Fix WordPress Image Upload Error Tutorial



I've filmed a brief tutorial that walks through most of this and also covers where to find good free stock images



As stated in my video, this should solve 99% of your WordPress image upload issues.

If you have a really large image, you can always use free services such as Optimizilla to reduce the size for easier uploading (and a faster loading website). I also like to use the ShortPixel Plugin on my websites.

Updated on: 10/10/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!