If you have a large database and are looking to migrate your website, or are hosting your web app using Microsoft Azure App Services, you may run into issues when trying to import the SQL file. In this tutorial, you will learn how to increase phpMyAdmin import file size and upload limit in Azure App Services.
By default, the maximum upload size when importing a SQL file using phpMyAdmin via SiteExtension or with MySQL in-app on Azure App Services is set to 8MB.
This is due to the default upload_max_filesize and post_max_size for PHP configured on Azure Web Apps. To increase the value, you’ll need to modify both the local and master values for PHP.
Steps to Increase Import Max File Size for phpMyAdmin in Azure Web Apps:
- 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 = D:\home\site\ini
- Go to the KUDU site for your web app.
- 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.
- 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.
Last updated on by Joshua Holdeman