Increase File Upload Size in Ubuntu + Apache (For SQL & .gz Files)
Running into the 2MB upload limit when uploading .sql or .sql.gz files on Ubuntu + Apache?
This limit comes from PHP defaults. Here’s the exact fix.
1. Edit php.ini
Check your PHP version:
Open the Apache PHP config:
Update the limits:
2. Restart Apache
3. Verify Changes
Create a phpinfo page:
Open in browser:
Confirm updated values:
upload_max_filesize
post_max_size
Bonus: Import Large SQL Files Faster
phpMyAdmin is slow for big files. Use terminal import instead: