Fix the error of not uploading images in WordPress

October 8, 2022 52hotness 0likes 0comments


In the process of using the wordpress source code, you encounter a situation when uploading an image file to hosting but cannot upload it and an error occurs and you receive the message "Post-processing of the image likely failed because the server is busy or does not". have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels.” not yet? This is a fairly common error in WordPress and can be caused by many different reasons. In today's article, I will show you some simple but effective methods to fix this annoying image upload error.

Method 1: Check the image size again.

The uploaded image has a size (pixel) and is too large => image processing time is long => time out (time out). Uploaded image has a capacity that exceeds the capacity that the website allows.

Screenshot 266

Method 2: Check the hosting again

– Host is full of storage space.
– Host is down time or overloaded, loses connection from user's web browser to host at the time of upload.

file 1550464394316 high cpu ram

Method 3: Change browser & clear cache

It is possible that the WordPress HTTP error error is an error uploading files and images that are not related to the website but are caused by the browser.

There are many cases where HTTP errors occur when you use Google Chrome. Although it's a good browser, it doesn't matter if you try to switch to another browser

maxresdefault 76

If you still get the WordPress HTTP error error after the above methods. Maybe you should try clearing the cache from your machine. The following tutorial will help you clear cache on many different browsers.

Method 4: Disable Plugins

Some Plugins when installed into WordPress will cause the above problem. If you previously uploaded the image without error, but since you installed some Plugin, the error situation occurs. So try disabling those plugins temporarily and try uploading images again.

Screenshot 268

From here, you need to locate the WordPress plugin that you want to deactivate. Next, point to the Plugin row and it will show you a link to disable that particular plugin.

Clicking on the link will disable that WordPress plugin immediately.

Once the plugin is deactivated, it will still be installed on your site, but WordPress will stop loading it.

If you want to start using the plugin again, simply click the Activate link again.

Method 5: Increase WordPress Memory Limit

wp-config file location The common problem that causes WordPress HTTP error is the lack of ram (memory). The lack of memory can also cause errors like 503 service unavailable error. To fix the low memory error, just add the following line to the wp-config.php file:

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

In addition, you should also adjust the upload_max_filesize and post_max_size parameters to about 256M. For example, for WordPress Hosting service provided by WP Basic, you log in to cPanel => select Select PHP Version => select Options tab => scroll down to the bottom and adjust the corresponding parameters to 256M.

Screenshot 269

The code above increases the PHP memory limit to 256MB. You can also check the server's memory limit using the PHP info.

Method 6: Set GD Library as the default Image Editor

You may not know WordPress has 2 image editors? That's right, WordPress uses Imagick or GD Library for image processing. Both are very good, but Imagick can cause a ram shortage that causes an HTTP error Image error.

To solve this problem, you need to set GD Library as default editor in your theme's functions.php file just add the following 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’ );

Good luck !

If during the implementation process there is an error or problem, you can contact the technical department for help. Currently, BKHOST has the following contact ways:
• Contact via switchboard number 024 7303 8088, then press 2 to meet BPKT.
• Submit tickets through website manage.hostagy.vn.
• Live chat directly on hostagy.vn homepage.
• Remote support via TeamView or Ultraview.



Source link

hostadmin

This person is a lazy dog and has left nothing

Comments