Increase Import Max File Size for PHPMyAdmin - Azure App Service on Windows

1 minute read | By Toan Nguyen

When using PHPMyAdmin via SiteExtension or with MySQL in-app on Azure Web Apps, the maximum upload size when Importing a SQL file is set to 8,192KiB.  This is due to the default upload_max_filesize and post_max_size for PHP on Azure Web Apps.  To increase the value, you’ll need to modify both the local and master values for PHP.

NOTE: If you’re planning to import a very large SQL file, please consider performing the steps at Migrating data between MySQL databases using kudu console – Azure App Service.

  1. In the Azure Portal, select your web app and go to “Application Settings”.
  2. Go to the App Settings section and add the following key and value and press save.

    KEY = PHP_INI_SCAN_DIR
    VALUE = C:\home\site\ini
    

php_ini_scan_dir

  1. Go to the KUDU site for your web app (https://<sitename>.scm.azurewebsites.net/debugconsole).

  2. Go to site directory and press the “+” button and create an “ini” directory.

kudu_add

  1. In the ini directory, create an “extensions.ini” file.

  2. Press the edit button next to the file.

  3. Add the following to the file and save.  This will modify the Master values.

 

    upload_max_filesize=30M
    post_max_size=30M
  1. Go to the wwwroot directory and create a “.user.ini” file.

  2. Edit the file and add the same values as mentioned in step 7 above. This will modify the Local values.

  3. Restart the site using the Azure Portal.

  4. PHPMyAdmin Import page will also reflect the changes.

phpmyadmin