Increase Import Max File Size for PHPMyAdmin - Azure App Service on Windows
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.
- In the Azure Portal, select your web app and go to “Application Settings”.
-
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
-
Go to the KUDU site for your web app (https://<sitename>.scm.azurewebsites.net/debugconsole).
-
Go to site directory and press the “+” button and create an “ini” directory.
-
In the ini directory, create an “extensions.ini” file.
-
Press the edit button next to the file.
-
Add the following to the file and save. This will modify the Master values.
upload_max_filesize=30M
post_max_size=30M
-
Go to the wwwroot directory and create a “.user.ini” file.
-
Edit the file and add the same values as mentioned in step 7 above. This will modify the Local values.
-
Restart the site using the Azure Portal.
-
PHPMyAdmin Import page will also reflect the changes.