HTTP Error When Uploading Images to WordPress : 9 Ways to Troubleshoot!

wordpress http error

Encountering an error is one of the most damaging things to your workflow. It automatically decreases your productivity. There are times when you see a WordPress HTTP error when uploading images. This error usually occurs when you try to upload an image to your WordPress website and use the built-in media uploader for that. Although this built-in tool usually uploads single and multiple media files very smoothly but in rare cases, it starts showing errors.

Here, we are going to talk about the cause of the WordPress HTTP error image upload and all possible solutions.

Whenever the WordPress media library HTTP error occurs you will see a generic message on your screen that does not tell much about the root cause of the problem. This makes it a little difficult to fix. You will have to diagnose the problem and dig down to the solution. If you find the cause first then fixing the error becomes relatively easy.

http error wordpress

Solutions: For HTTP Error When Uploading Images to WordPress

Here, we have overviewed all the possible fixes for HTTP error uploading image WordPress. These solutions will work for you whether you’re uploading an image, a video, a PDF file or any other file type that is supported by WordPress.

  • Refresh the Page: This is one of the first few easy solutions that you can try when you come across this HTTP error when uploading images to WordPress. To fix WordPress image upload HTTP error, all you have to do is, refresh the page.
  • Decrease the Image Size: This error can occur when you are trying to upload a large image. In such a case, the server is unable to process the large file. To fix this error, you can reduce the file size. There are so many third-party plugins available to optimize images. You can use any of them and get rid of the WordPress HTTP error very easily.
  • Rename the Image File: If the error occurred while uploading images to your WordPress website then to fix that you can try renaming the file. Although when you try to upload a file twice then WordPress automatically appends a number on the end in the second file’s name to rename it if this does not happen, you can rename it by yourself. Also, always avoid uploading an image with file names containing any special characters.
  • Temporarily Deactivate Plugins and Themes: To fix this error or any other HTTP error, you can try deactivating your plugins. There are chances that you have installed a plugin that is not compatible. There are a few plugins including image optimization plugins that can cause HTTP error WordPress. If you don’t want to affect your live site then you have an option of cloning your live site to a staging environment. And, if the http error WordPress is still being shown then you can deactivate all the plugins at once and then try activating them one by one. Also, try clearing the cache and browser history. This way you will be able to find out which plugin is causing the problem. You can also switch your WordPress Theme to the default. If this resolves the problem then you got your answer.

deactivate wordpress plugins

 

  • Increase the PHP Memory Limit: Another possible cause of HTTP error WordPress image upload is that your server does not have enough memory This insufficient memory could be the reason why the background upload process is not getting completed. This can be a common case if you are using a shared WordPress hosting. To fix the error, you need to increase the PHP memory limit. You can do this in three different ways:
    • With wp-config.php: In your wp-config.php file, you can add the following code:

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

  • With cPanel: In the software section, click on ‘Select PHP Version’. Click on ‘Switch to PHP’. You can then click on ‘memory_limit’ to change its value.
  • With php.ini: If you have access to php.ini file then you can increase the PHP memory limit by adding the following code on the top of the file:

<IfModule mod_suphp.c>

suPHP_ConfigPath /home/yourusername/public_html

</IfModule>

 wordpress http error

You May Also Read: How to Fix Malware Virus Error in Website?

What If Above Solutions Can’t Fix the Problem?

We have mentioned all the common causes and their respective solutions. If none of them can fix the problem then you try these:

  • Check Uploads Folder Permissions: If you are getting this HTTP error then the case could be related to a folder permissions error. In such a case, you are not able to write to the directory. You can check the folder permissions using an FTP client and ensure that they are set up properly.
  • Check PHP version and update it to the latest version: One of the most common causes of this error is an outdated PHP version. You can also try moving it to the latest version and see if that solves the problem. Running the latest version also ensures better security and performance of your website. If you are doing it using cPanel then you already have an option available to change the PHP version. All you have to do is, log in to cPanel and go to the ‘Software’ category and then click on ‘Select PHP Version’.
  • Remove Custom Media Library Path: There are also high chances that your media library path is not set up correctly and this can cause the HTTP error. If you go to ‘Media’ under ‘Settings’ in the WordPress dashboard of your website and see a file path value listed then you should delete it. And after that click on ‘Save Changes’.
  • Disable mod_security: There are chances that mod_security which is an open-source firewall can cause this WordPress HTTP Error to occur. If this is the case, you can disable the mod_security. To do so, you have to add the following code to the top of your .htaccess file;

<IfModule mod_security.c>

SecFilterEngine Off

SecFilterScanPOST Off

</IfModule>

If you are using cPanel, then you can disable it just by clicking on ‘ModSecurity’ in the ‘Security’ section.


Final Thoughts:

Have you just come across the WordPress HTTP error image upload? If yes then you must be figuring out what caused this issue and what are the possible ways to fix this. Generally, this error takes place when you try to upload images or some other media files to your website with the help of the built-in media uploader. This issue can be fixed very easily. For this, first of all, you have to figure out what exactly caused this issue. Because when this error occurs it simply means WordPress is not able to figure out the root cause of the error and this is why it is displaying the generic ‘HTTP error’ message. Then you can find an appropriate solution for this and get rid of the error very easily.

If you have some queries about this then you should consider taking some professional help. There is no need to go anywhere when you feel the requirement of some professional help related to WordPress. We are just a call away. With our team of skilled professionals, we can help you with your issues. If you have any queries about WordPress Security Services, WordPress Installation, Landing pages, etc. then you can contact us on 1-866-332-O276. We work around the clock. 


Other Blog you might wish to read:

You might also like

Subscribe to Our Newsletter