WordPress images not uploading

How to solve WordPress images not uploading

Read Time:3 Minute, 30 Second

One of the most recurrent errors in WordPress is the problem of the ugly failure that is shown when you can not upload an image, caused by several possible culprits and, consequently, with different possible solutions. The most common error is because your site does not support files larger than the default defined. It will show an ugly message.

WordPress images not uploading error

WordPress images not uploading

This error, depending on your situation may have an easy or difficult solution. If you manage the site you just have to add a few lines to your file .htaccessto avoid the upload size limit of WordPress files, these:

#set max upload file size
php_value upload_max_filesize 10M

#set max post size
php_value post_max_size 10M

But if this is not the case, if you do not manage your site, then all you have to do is ask your administrator to make the change for you, in your file .htaccessor in the PHP.iniserver file.

Another solution of HTTP error when adding images

HTTP error when adding images

WordPress may display the term HTTP error when trying to upload images. Often the problem can be solved by taking care of the image itself: resize it if extremely large, rename the file if you have used special characters (apostrophes, accents) or change the extension, perhaps using jpeg, which tends to give very few problems.

Plugins

Also, it may be that WordPress does not load images because plugins are creating problems. If you use a dedicated plugin specifically for the management or automatic editing of uploaded photos, you can try to disable it. The same can be done for other plugins if you notice that the problem occurred after installing a new plugin or updating others.

The thing gets complicated when the problem is not so obvious, and you see an error of this type, where it does not inform you of the reason for it :

Possible errors

Possible errors

The first, and easiest to fix, are the permissions of the folder where the files are uploaded , because you only have to access it, by FTP or from the file browser of your hosting panel and change folder permissions, that to assure we will put 777, that is, reading, writing, and execution for all.

One variable is that you can not create the folders of month/year/ within the upload folder, normally ” uploads,” in which case it is to this that you have to increase the permissions. This usually happens a lot in automatic installations created from the housing panel.

Another possibility is that you have activated the one known as ” Safe mode,” something that you will have to ask your hosting provider if you want to deactivate it and check if that is the reason.

And, finally, one of the solutions that work in many cases is to disable the plugins and even change the subject, as there are some of them that have built-in jQuery that interferes with WordPress.

In this case, you would have to deactivate plugins one by one and check if the upload of files works later, and the same with the theme, changing to another to see if it is fixed.

Solution from WP-CONFIG.PHP

WP-CONFIG.PHP

Also, in some cases, due to server issues, sometimes due to improper configuration or installation, WordPress does not locate the folder where the files are to be uploaded, in which case you could fix it by adding something similar to this to the configuration file, the fundamental one wp-config.php:

define( ‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/tmp/’) ;

Solution with Function

You can also try to fix it by adding the following code to your customizations plugin or the functions.php file of the active theme:

add_filter( ‘wp_image_editors’, ‘change_graphic_lib’ );
function change_graphic_lib($array) {
return array( ‘WP_Image_Editor_GD’, ‘WP_Image_Editor_Imagick’ );
}

Solution from .htaccess

In the .htaccess file, add these lines:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

It is very disgusting and quite annoying, but most of the time you can solve with some of these possibilities. If all the process of WordPress images not uploading isn’t working, contact with your hosting company.

About Post Author

Robi

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

hashtag symbol Previous post How to use Hashtag Symbol for Instagram
photo album Next post How to post a photo album on Flickr