WordPress image upload HTTP error is one widely known disgusting error which disrupts the workflow. Here Are The Steps To Solve WordPress Image Upload HTTP Error. It is a guideline to troubleshoot to find the issue since it is actually a vague error.
If you are reading this guide while you have a post to publish and got stuck, upload the image at some other location using FTP program and insert the image with plain HTML code in the post as temporary emergency measure. Later, you after fixing the error, you can upload properly via WordPress media uploader.
Commonly, this error is thrown :
---
- Out of tight security measures
- Lack of resources
- Improper permissions
The total process of image uploading is complicated and from server backend to WordPress backend, the total system will try to defend SQL injection. Images have metadata including a file name, after you upload the image, the metadata get extracted and get into the database. Commonly, this error is out of false positive attempt to prevent attack.
Make sure that you have cleared your browser cache and re-logged into the administrator dashboard.
Steps To Solve WordPress Image Upload HTTP Error
If you are suddenly facing it without any change of server/host and you uploaded images in the same month :
- It is likely that you have some theme or plugin related issue. Issue may be a need of simple pending update or some security related plugin (like IP Geo Block) or image compression plugin or apparently unrelated plugin is disturbing. Simple temporary deactivation should solve the issue.
- The file name has possible problem like presence of period (.) or apostrophe (,) within the name of name. As examples,
Abhishek's photo.jpg
,Dr.Abhishek Ghosh.jpg
are likely to throw error. Correct convention isabhishek-s-photo.jpg
,dr-Abhishek-ghosh.jpg
. - May be the image size is too large in dimension. An image wider than 1500 pixels may throw error.
- File type (JPG or PNG) may be temporarily creating error.
- Database server for some reason is slow.
- CDN (if you use one) is not serving some needed JavaScript.
If you are suddenly facing it without any change of server/host and you have not uploaded images in the same month :
- All the above points are applicable.
- Check whether WordPress can create month name directory.
If you are suddenly facing it without after change of server/host :
- Really difficult to easily point out. Error can be out of PHP.ini settings, Apache .htaccess file settings, Apache security module, less allocated memory, improper permission to WordPress.
- All the above points are applicable.
There are some generally accepted ways. Changing memory limit from wp-config.php
is one of them :
1 | define( 'WP_MEMORY_LIMIT', '256M' ); |
Apache mod security module may need tweak via .htaccess
:
1 2 3 4 | <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> |
May be, you need to exclude the file upload and WP CRON scripts from Access Control based on Authentication via .htaccess
(it is slightly insecure) :
1 2 3 4 5 6 | <FilesMatch "(async-upload.php|wp-cron.php|xmlrpc.php)$"> Satisfy Any Order allow,deny Allow from all Deny from none </FilesMatch> |
These settings are minimum need from php.ini
for modern WordPress :
1 2 3 4 | upload_max_filesize 64M post_max_size 64M max_execution_time 300 max_input_time 300 |
Conclusion on WordPress Image Upload HTTP Error
It is a disgusting error. If nothing of the above works, you possibly need to deactivate all the plugins, activate default WordPress theme. Also try checking the webserver’s error log.
Tagged With wordpress http error image upload , wordpress image upload http error php ini