Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: HTTP Error – WordPress Media Upload/Image Upload  (Read 3794 times)

0 Members and 1 Guest are viewing this topic.

sajugovind

  • Guest
HTTP Error – WordPress Media Upload/Image Upload
« on: July 19, 2014, 06:41:21 pm »
At least few of the WordPress users might be familiar with this error “HTTP Error ” on WordPress admin area while uploading Images to Media library. It’s a known issue and I am going to give you the simplest way to resolve this error.


The error is mainly due to the usage of Imagemagick as the default Image editor. So this can be easily fixed by switching the default image editor to GD.

For this, we will have to create a plugin manually from your cPanel and enable it from WordPress admin area. The steps are as follows;

Go to your “plugin” folder of your wordpress installation through your cPanel FileManager or FTP.

“yourdomain.in/wp-content/plugins/“

Create a folder “default-to-gd“

Get into the folder and create a file called “default-to-gd.php” inside the folder.

Paste the following lines of codes into the file and “Save” it. The following codes will set GD as your default Image Editor instead of Imagemagick.

Code: [Select]
<?php
/*
Plugin Name: Default to GD
Plugin URI: http://wordpress.org/extend/plugins/default-to-gd
Description: Sets GD as default WP_Image_Editor class.
Author: Mike Schroder
Version: 1.0
Author URI: http://www.getsource.net/
*/
 
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' );


We have created the required files for the Plugin and now login to your WordPress admin area and Go to “Plugins Or Manage Plugins“.

You should see a plugin called “Default to GD” that we have created from File Manager just now. Click on “Activate the Plugin” and activate it.

Your default image editor has now been changed to GD once you activated the plugin perfectly. Try uploading your Images to your Media now, it should work

Thats it  :)