When we import Product CSV from Admin it says

Make sure your file isn't more than 2M.

How to increase this size? I have 5M file size. Don't want to create multiple CSV files with each 2M

  • 1
    You have to change upload_max_filesize value in php.ini. Commented Oct 7, 2016 at 7:23

3 Answers 3


find your php.ini file, for mine it is in /etc/php/7.0/apache2/php.ini

change the value of below line as per your interest

upload_max_filesize = 3M

after that restart your mysql and apache server, load the page again the changes get affect

enter image description here

also increase the execution time, it is help to avoid time out issue.

  • Oh. I though Magento Related Issue. But it didn't. Works fine. Here you go :)
    – Jackson
    Commented Oct 7, 2016 at 7:30
  • I just updated the php.ini with 512M. But I could only import 8M data. Is that the maximum?
    – TS Guhan
    Commented Jan 18, 2018 at 12:31
  • 3
    @TSGuhan you may have already discover the issue but I believe the reason you are stuck at 8M is due to the post_max_size in the php.ini. Increasing this to 512M will most likely allow you to upload bigger files. Commented May 14, 2019 at 15:42

Magento 2 import process loads the CSV data into Mysql database in the table importexport_importdata.

You need to make sure that the Mysql parameter 'max_allowed_packet' is greater than 7.5M which correspond to 5M * 1.5 in your context.

And check also your PHP setting :



In your context, updating the PHP setting upload_max_filesize is enough, but if the file size increase, update the Mysql parameter.

  • 1
    post_max_size did the trick for me. Thanks for that.
    – medina
    Commented Mar 6, 2017 at 2:38

I was able to increase the file size via cpanel's mulit php editor with my hosting company.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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