To increase MySQL phpmyadmin import file size in Ubuntu 16.04 or newer, follow these steps. In the newest Ubuntu version you can have either PHP 5 or PHP 7.

Step – 1: open php.ini of the appropriate PHP version(s).

  • For PHP v5.0
    sudo -H gedit /etc/php5/apache2/php.ini
    
  • For PHP v7.0
    sudo -H gedit /etc/php/7.0/apache2/php.ini
    
  • For PHP v7.1
    sudo -H gedit /etc/php/7.1/apache2/php.ini
    
  • For PHP v7.2
    sudo -H gedit /etc/php/7.2/apache2/php.ini
    

Step – 2: Now need to increase below parameters in the php.ini file.

memory_limit = 1500MB

post_max_size = 1500MB

upload_max_filesize = 1500MB

Please Note : post_max_size should be larger than upload_max_size

Step – 3: Now you need to restart your apache server to effect changes.

sudo service apache2 restart