[How To] Increase import file size in PHPMyAdmin

, , 4 Comments


By default when you want to import sql file size is 2MB in PHPMyAdmin.
That is PHP’s file upload limit.

To change maximum import file size do following steps.

  1. Find php.ini file
    $ locate php.ini
    /etc/php5/apache2/php.ini
    /etc/php5/cli/php.ini
    /usr/share/doc/php5-common/examples/php.ini-development
    /usr/share/php5/php.ini-production
    /usr/share/php5/php.ini-production-dist
    /usr/share/php5/php.ini-production.cli
    /var/www/php.ini
    root@Gevorg-VM:/home/gevorgh#
  2. Edit php.ini file
    $ vim /etc/php5/apache2/php.ini
  3. Find following variables and change values as you need:
    post_max_size = 8M
    upload_max_filesize = 2M
    max_execution_time = 30
    max_input_time = 60
    memory_limit = 8M
  4. Restart apache to take effect
    $ service apache restart

In this example we used Ubuntu 11.10

 

4 Responses

  1. Aldrin Hartunian

    January 22, 2016 1:36 am

    Hi Gev, great to see another Armenian posting on here. Also we should mention if you increase the upload_max_filesize say above 8mb then you need to also increase the post_max_size to be greater than 8mb or else it caps you at 8mb.

    Reply

Leave a Reply