Motion picture this: y'all've started building your WordPress website. You've created your navigation bill of fare, header, website footer, and the blank bones of your most essential pages like the "About U.s." and "Contact" page.

Now you're fix to start uploading images, videos, and other media. Everything is going smoothly with the built-in media uploader in WordPress — until you lot see an HTTP error. Uh-oh.

Something went wrong, only y'all're not certain what exactly. In this post, we'll walk through different reasons you might exist getting the generic HTTP image upload error and unlike means you tin resolve it.

Grow Your Business With HubSpot's Tools for WordPress Websites

What is HTTP error when uploading images to WordPress?

HTTP error when uploading images to WordPress is a generic error message that can occur when you're trying to upload files using the congenital-in media uploader in WordPress.

For example, allow'southward say you wanted to upload a featured prototype and alter its size within WordPress. Here's how the HTTP fault might display.

Generic HTTP error occured when uploading an image file to WordPress

Image Source

Why am I getting HTTP error when uploading images to WordPress?

Usually, an HTTP error comes with a status lawmaking like 403 or 502. These provide more details near why the mistake is occurring.

The HTTP image upload fault doesn't considering WordPress can't figure out the crusade. So information technology displays a generic HTTP error bulletin instead

Information technology'southward not that WordPress can't figure out whatsoever reason for the error — it just can't narrow downwards the reason for the error to but one. A few possible causes of the HTTP image upload mistake are:

  • Apostrophes, semi colons, or other special characters in the file name
  • Plugin or theme issues
  • Exceeded PHP memory limit
  • Exceeded maximum upload file size
  • Outdated or unsupported PHP version

Because there are several potential causes of this error, we'll walk through several steps you tin can take to resolve it. We'll start with the simplest steps and and then move on to the more complex and time-consuming.

1. Refresh your browser.

This is basically the advice I get every fourth dimension I inquire for Apple tree back up: have you lot tried turning your computer on and off? It can be frustrating to hear but the advice is audio. Y'all need to make sure that any issue you're having isn't a temporary glitch.

Along the aforementioned lines, the beginning thing y'all should practise to troubleshoot the HTTP paradigm upload error is refresh your browser and try uploading the file again. Sometimes, a temporary issue with your Wifi or hosting provider can prevent a file from uploading successfully. In that case, once yous refresh the browser, you should exist able to upload information technology with no problem.

two. Rename the file.

If refreshing your browser doesn't work, then the next simplest solution is to rename the file you're trying to upload. You might be getting the HTTP error bulletin because the file proper noun contains special characters, like apostrophes, semi-colons, or international language symbols.

In one case you rename the file, endeavour uploading it again. If you still go the HTTP fault, and so at to the lowest degree you've just lost a few seconds of time and can move onto the next step.

iii. Resize the file.

If you lot're still getting the HTTP image upload error message, the problem might be that your paradigm file is only besides big.

To ensure information technology's nether the maximum upload file size, you can resize and compress the image using a range of image optimization plugins or free tools similar Squoosh.

Squoosh can help you resize and compress images to resolve HTTP error when uploading images to WordPress

4. Temporarily deactivate your plugins.

Certain WordPress plugins might be causing the HTTP epitome upload error on your site. Image optimization and security plugins are notorious culprits of this generic message.

If you recently uploaded a new plugin and are merely seeing the HTTP image upload error, effort deactivating that plugin. If that doesn't resolve the error, then endeavour deactivating your plugins one-by-1.

You can deactivate plugins to try to resolve HTTP error when uploading images in WordPress

If the HTTP fault goes away afterwards deactivating a plugin, then you might need to observe an alternative to utilise on your site. Or you tin can reach out to the plugin programmer to troubleshoot this fault.

If the HTTP mistake doesn't become away, then go ahead and re-activate your plugins and try the next step.

5. Switch to a default theme.

If it's non a plugin prompting the HTTP paradigm upload error, then it could be your WordPress theme. This is particularly likely if you've merely downloaded and activated a new theme and are at present getting the HTTP fault.

In that example, yous can create a backup of your site. Then switch to a default theme, similar this yr's Twenty Twenty-One theme.

Switching to the default twenty twenty-one theme can resolve HTTP error when uploading images to WordPress

If that fixes the HTTP error, then you might stick with this default theme, detect another theme that doesn't prompt this fault, or reach out to the developer of your original theme and ask them to troubleshoot.

half dozen. Increase your PHP memory limit.

It'south possible that y'all're seeing an HTTP error when uploading images to WordPress because you've exceeded your PHP memory limit. That means your server doesn't have enough available memory for the upload procedure to consummate successfully.

The good news is to increase this retention limit, y'all just need to add a unmarried line of lawmaking to your wp-config.php file. Follow these steps:

  • Log in to your hosting control panel.
  • Open up the File Managing director.
  • Locate the wp-config.php file and right-click to edit information technology.

Editing wp-config.php file can resolve HTTP error when uploading images to WordPress

Image Source

  • Curlicue down to the end of the file to the line that reads /* That's all, stop editing! Happy blogging. */
  • Right before this line, add the following code:
                                          
define ('WP_MEMORY_LIMIT', '256M');

Once you relieve your changes, your PHP memory limit will now be increased to 256MB, which is the recommended limit. Y'all can now return to your WordPress admin dashboard and effort to upload the file again. If you're nonetheless seeing the HTTP error, so movement onto the next pace.

vii. Update your PHP version.

WordPress recommends your host supports PHP vii.4 or greater. If you're not running on the latest PHP version, then you're not only putting your site at adventure — you might also exist causing the HTTP error when uploading images to your site.

Most hosts make this update procedure as easy as possible. While the process might differ slightly depending on the hosting provider, it will await something like the post-obit. Here are the three steps for updating your PHP version with a2hosting.

  • Log into your command panel.
  • Scroll to the section labelled "Software."
  • So click Select PHP Version, and select the latest version that your host supports.

Upgrade PHP version in a2hosting's cpanel to resolve HTTP error when uploading images to WordPress

Image Source

Brand sure you're running the latest version of PHP and and then try uploading the file again. If you're still seeing the HTTP error, then move onto the next step.

eight. Edit your .htacess file.

WordPress uses two PHP modules for processing images: Imagick and GD Library. If as well few resources are allocated to Imagick, and so y'all might get the HTTP error when uploading images to your WordPress site. This is specially likely if you utilise shared hosting since a express amount of resources is allocated to multiple sites running on the same server.

To ready this error, yous can add a line of lawmaking to your .htaccess file that tells Imagick to use a single thread — instead of multiple threads — to process images. Follow the steps below.

  • Log in to your hosting control console.
  • Open the File Managing director.
  • Click the public_html folder.

Open your public_html folder to edit your .htacess file to resolve HTTP error when uploading images to WordPress

Image Source

  • Open up the folder labeled "wordpress."
  • Locate the .htaccess file and right click to edit it.
  • Scroll down to the bottom of the file and add together the post-obit line of code:
                                          
MAGICK_THREAD_LIMIT 1

In one case you relieve your changes, render to your admin dashboard and attempt to upload the media file. If the HTTP fault is not resolved, attempt the next stride.

9. Change your default epitome editor.

If you're notwithstanding getting the HTTP error when uploading images to WordPress, the problem might still exist that Imagick is exhausting the available resources on your server. In that example, you lot can make the other PHP module for processing images — GD Library — your default editor.

To do then, yous'll demand to add some code to your theme's functions.php file. Follow these steps:

  • Log in to your hosting command panel.
  • Open the File Manager.
  • Open your wp-content folder.
  • Open your themes folder.
  • Locate the functions.php file and right-click to edit it.
  • Scroll to the bottom of the file and paste the post-obit code snippet.
                                          
function wpb_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', 'wpb_image_editor_default_to_gd' );

Once you relieve your changes, attempt to upload the media file again. If yous still go the HTTP fault, delete the code you added to the functions.php file. Then move onto the next step.

10. Contact your hosting provider.

For whatsoever blazon of error, contacting your hosting provider is always an option, only it should be considered a final resort.

If you've tried the steps above and are yet seeing the 429 error, it's possible that the crusade originated from your server and not your website. By reaching out to your provider, they may be able to solve the issue or provide valuable insight.

Error-gratuitous Image Uploads to WordPress

An HTTP error when uploading images to WordPress can be frustrating considering of its lack of specificity. The adept news is that you can ofttimes resolve the error without adding whatever code or spending much time troubleshooting.

Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

Originally published Feb 4, 2021 vii:00:00 AM, updated March 17 2021