Freigeben über


Increase Import Max File Size for PHPMyAdmin - Azure App Service

 

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 = D:\home\site\ini

php_ini_scan_dir

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

4. Go to site directory and press the "+" button and create an "ini" directory.

kudu_add

5. In the ini directory, create an "extensions.ini" file.

6. Press the edit button next to the file.

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

 

 upload_max_filesize=30M
post_max_size=30M

8. Go to the wwwroot directory and create a ".user.ini" file.

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

10. Restart the site using the Azure Portal.

11. PHPMyAdmin Import page will also reflect the changes.

phpmyadmin