fbpx

Are you facing WordPress upload error issue while uploading media files to WordPress? Let’s see what you can do to fix the WordPress HTTP Error issue.

What is HTTP error?

HTTP error in WordPress is an indication that something went wrong during the upload process of the media file. It mainly occurs in case of uploading any media file to the media library. Let’s see how we can fix the issue.

WordPress upload error

Causes of HTTP error:

There are two main causes behind HTTP error generation. They are Client Error and WordPress Error. Let’s Learn what these are.

1. Client Error:

This is when there is a problem on the user side. This includes login failures, character usage errors in file name, local cache, connectivity issues and anything that is caused by the issues on the local computer where the dashboard is being accessed from.

2. WordPress Error:

When you see an HTTP error message while using WordPress, that means there is some issue with media uploading process. But WordPress couldn’t figure it out and thus generates this error. Thus WordPress upload error is generated.

And also as this message doesn’t let you know the proper reason behind this error. You have to try every other possibility to get to the solution. WordPress issues include server issue, memory limit, plugin problem, theme support etc.

This can be solved by:

Fix HTTP Error

How to Fix HTTP Error in WordPress Websites?

  1. Refresh the Page
  2. Remove special characters
  3. Switch Browsers
  4. Deactivate plugins
  5. Memory Limitation
  6. Change your Default Image Editor
  7. Edit .htaccess
  8. Theme Check
  9. Check your PHP Version
  10. Clear Cache
  11. Resize the File
  12. Folder Permissions
  13. Media Library Path
  14. Disabling Mod-Security
  15. Add From Server Plugin
  16. Change Image Extension
  17. Deactivate Image Optimizer Plugin
  18. Change Upload Medium
  19. Rename File
  20. WordPress Host Consultation

Solution 1: Refresh the Page:

They may be times when a temporary problem in the server may cause this HTTP error. So first, try reloading or uploading when you have a good server connection. For this, you may wait for a few minutes and try uploading again. If it’s uploaded successfully, then this was just a technical glitch and nothing more.

Refresh Page

Solution 2: Remove special characters:

If your file name has some special characters or symbols, do remove them. These special characters may include apostrophes, semicolon or others. It happens that after removing these from the respective file name, the HTTP error problem is solved.

Special Characters

Solution 3: Switch browsers:

There may be a probability that there is a problem in your browser and not the file or site. So, try switching your browser. Though google chrome is the best browser. If you face this problem in chrome, try again through a different browser such as internet explorer, Mozilla etc. And if the problem gets solved, the fault was at the browser. If the problem persists, then we have more solutions for you.

Switch Browsers

Solution 4: Deactivate plugins:

Was your image uploading process was fine before you installed this new plugin. Then the problem may be in the plugin. Uninstall that plugin and re-check. If the fault is at the plugin, inform developers about that and use some other plugin for that purpose. Mostly image optimization plugins are known to cause such a problem. So, if you have to try them, check for a better working one that any random one.

Deactivate Plugins

Solution 5: Memory Limitation:

Another cause behind HTTP error may be the shortage of memory. It can also lead to many other such issues which include 503 services unavailable error etc. You can add extra 256mb PHP memory by using a line of code:

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

Add this line of code to your wp-config.php file. But before adding this, check for maximum available memory limit on your server.

Memory Limitation

Solution 6: Change your Default Image Editor:

WordPress mainly uses two image editors. The first one or the default one is Imagick. Imagick is a great option. But it has only one disadvantage that it takes up more memory than the second option GD Library. Thus, this Imagick leads to the creation of HTTP error. We can solve this issue by changing our default editor from Imagick to GD Library. This can be done by using a short piece of code:

function hs_image_editor_default_to_gd( $editors ) {

$gd_editor = ‘WP_Image_Editor_GD’;

$editors = array_diff( $editors, array( $gd_editor ) );

array_unshift( $editors, $gd_editor );

return $editors;

}

add_filter( ‘wp_image_editors’, ‘hs_image_editor_default_to_gd’ );

Place this code in your theme’s functions.php file and save your changes. Now try again to upload your file. If your problem is solved it’s fine or else reverts this action.

Media Settings

Solution 7: Edit .htaccess:

The .htaccess file is the gatekeeper of WordPress. It is located in the WordPress root folder. It has control over all functions and requests. It controls where requests must be sent among all those functions. We can resolve the HTTP error problem by adding a piece of code in the .htaccess file:

SetEnv MAGICK_THREAD_LIMIT 1

There is a probability that the problem is resolved. If not yet, then here we have two code snippets. Implement them individually and then save and try to upload the media file again:

<IfModule mod_security.c>

SecFilterEngine Off

SecFilterScanPOST Off

</IfModule>

or

# Exclude the file upload and WP CRON scripts from authentication

<FilesMatch “(async-upload.php|wp-cron.php|xmlrpc.php)$”>

Satisfy Any

Order allow, deny

Allow from all

Deny from none

</FilesMatch>

.htaccess

Solution 8: Theme Check:

If you just changed your theme into a beautiful new trending one. And you started facing this problem, then it’s time to change your theme. They may be a chance that your new theme isn’t supporting or has some issues. Create a backup of your current website. Now change to default theme and check same media files again. If there is no problem then contact your theme developer to solve the issue. And till you get a response, use another theme or the default one.

Theme Check

Solution 9: Check your PHP Version:

Version 3.2+ WordPress requires PHP of version 5.2.4 or higher to have a smooth run. Any version olderthan this may causeHTTP error. There are some hosting servers that use older PHP versions. Those in turn cause HTTP errors when you try to upload media files. For this either you ask your host to update PHP version or switch to another host.

PHP Version

Solution 10: Clear Cache:

This is a simple hack, but could work if you haven’t cleared your cache in a while. Try clearing all your cache for the browser you are using and retry uploading the media files again.

Clear Cache

Solution 11: Resize the File:

Resize your image according to the WordPress necessity. By reducing the file size or by decreasing height or width can solve this problem. There are many third party image optimizers used for this purpose. But the popular one among all is Imagify. Sometimes PNG and JPG file names can alter in sizes. So, we need to check for both image types for preferable image size.

Resize File

Solution 12: Folder Permissions:

Wrong folder permissions can also cause an upload error. If your WordPress site is hacked or infected with malware, it leads to multiple changes of permissions. Files uploaded via media library are stored in a folder “/wp-content/uploads”. You can use FTP client to see your folder permissions. You can also reach out to your WordPress host for help or support. They can GREP file permissions on your folder for you. They can ensure all permissions are properly set. If you prefer changing them manually, make sure to check properly. Check before clicking on “recurs into subdirectories‘ or “apply only to directories”.

Folder Permissions

Solution 13: Media Library Path:

Improper setup of media library path may also be a reason behind HTTP errors. You can resolve this by going to “media” in your dashboard and then to “settings”. Now there you can find a file path value listed, clear it and save changes. Now your media files are stored in the default “/wp-content/uploads” folder. If you don’t find a library path in here, then this is not the problem.

Media Library Path
WP File Manager

Solution 14: Disabling Mod-Security:

Mod-security is an open source firewall. Sometimes it may be the reason behind the occurring WordPress HTTP errors. Use the following piece of code to disable the mod-security. Place this code on top of your .htaccess file.

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

If you use a cPanel, you can disable this by clicking on the “ModSecurity” option. It is in the “security” section of your panel. Then over the domain, you want to select, just change the status from “off”, to “on”. Note that disabling Mod_Security is not Recommended.

ModSecurity
Configuration of Domains

Solution 15: Add From Server Plugin:

If you have already tried all possible ways but nothing worked, drop a mail or message at WordPress host. And in the meantime, you can use this temporary fix. Install this free “add from server” plugin. This was originally developed to add very large files via SFTP. But presently, this isn’t supported or maintained.

Add plugins from server

Solution 16: Change Image Extension:

Sometimes WordPress restricts certain file types from upload for security (eg. SVG). This can too, cause the “Upload http Error”. It can be done just by changing or converting image extensions either to .png to .jpg or vice versa.

file extensions

Solution 17: Deactivate Image Optimizer Plugin:

Some image optimising plugins don’t support png or jpg files.this may trigger WordPress to cause HTTP error. You can resolve this by uninstalling that plugin. If the problem is resolved, opt for another plugin or seek help from that plugin developer.

deactivate image optimiser plugin

Solution 18: Change Upload Medium:

In some cases, the process you are following may be a reason behind this HTTP upload error. You can resolve this by clicking on the ‘media’ in your dashboard and then ‘add new’. Now select files you want to upload.

change upload medium

Solution 19: Rename File:

If your file name is in any other language other than English, then in rare cases, this may be causing the upload error in WordPress. Try changing the language to English and upload the file again.

rename file

Solution 20: WordPress Host Consultation:

If you have tried all the above solutions and yet couldn’t resolve WordPress upload HTTP error, consult your WordPress host for support.

wordpress host consultation

Conclusion:

Hope your problem is resolved. if you still need any help, we are here for you.

We also offer free Quick Fixes, let us take a look and we will fix your WordPress upload issue ASAP.

Leave a Reply