I am getting the following error on uploading files in Magento admin.

Upload HTTP Error

I have added the following to my php.ini

upload_max_filesize = 200M
post_max_size = 200M
memory_limit = 512M

I have also added this to my nginx config

client_max_body_size 200m;

enter image description here

I have also toggled between https and http

  • Update adobe flash player. Check nginx error log. Global array $_FILES have field 'error' - check this field. Change browser. Try from mobile. – zhartaunik Apr 8 '15 at 14:15

If you are using PHP 7 then go to


Find the following code


And replace it with

  • fixed it for me. running magento with php 7.0.13 – Konstantin Gerasimov Dec 12 '16 at 13:13
  • worked mag v PHP7.1.10 – Martin Oct 16 '17 at 15:02

The problem was the following:

php-fpm was running with the group www. the folder /var/lib/nginx was set to nginx:nginx

chown -R www-data:www /var/lib/nginx

Therefore I reset the owner on the folder to www-data:www and it works!


HTTP upload error: Such error is received due to 'n' number of reasons like folder permission, server PHP handler, etc and solutions for the same are easily available on the web.

But in my case, everything was fine but still, the issue was not resolved. Finally, the issue was found to be with .htaccess protection applied to the Magento website. The .htaccess protection should be disabled while image uploading. Not sure why Magento behaves like this but server admins will have to care of that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.