WordPress Media Upload HTTP Error – 500 Internal Server Error

Are you facing an HTTP Error ( 500 Internal Server error ) just when the upload progress is about to complete for media in wordpress? I believe you have already looked into PHP max memory and max execution time. You are facing the same issue even you uploading images of small size. If this is the case, find below a solution. Simply add the below code to your theme’s functions.php

add_filter( 'wp_image_editors', 'change_graphic_library' ); 
function change_graphic_library($array) {
   return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );


GD and ImageMagick are two graphics libraries in PHP. GD is the one that is available by default in PHP since PHP 4.3. ImageMagick is the one that is installed by your host. You are probably the one who’s webhost has not installed ImageMagick and you will have to live with GD.

GD is a little faster than ImageMagick; on the other hands, ImageMagick offers some extra functionality. As far as wordpress is concerned,  both are totally fine.

For the record, I faced this issue on HostGator’s business cloud hosting.