HTTP Error while uploading media on wordpress

HTTP Error while uploading media on wordpress

This post shows to how to solve http error while uploading media files on wordpress dashboard.

Fix 1

Try changing PHP versions if the multiple PHP versions are supported on control panel .

Fix 2

Most common issues for the newer wordpress versions is the issue with ImageMagick. ImageMagick is the default Image Editor for wordpress. Try changing it to GD libraries. This will resolve the issue. For that, we can make use of a plugin “default-to-gd”. This is available on as code. We need to copy down that code into wp-contents/plugins >> create a new directory “default-to-gd”, inside that create a new php file “default-to-gd.php” with following code


Plugin Name: Default to GD
Plugin URI:
Description: Sets GD as default WP_Image_Editor class.
Author: Mike Schroder
Version: 1.0
Author URI:
function ms_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’, ‘ms_image_editor_default_to_gd’ );


Save the file. Open the WordPress dashbard >> plugins, you will see it installed. Activate the plugin. This will enable GD as default image editor for wordpress.

Try uploading a image on media >> upload new , It will work charm

This fixes HTTP Error while uploading media on wordpress.