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 memory_limit to at least 128M, my post_max_size to at least 32M, and my upload_max_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.0 (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.0 (if not PHP 7.2).

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.

Was this answer helpful? 0 Users Found This Useful (0 Votes)