Quick Answer: To increase the phpMyAdmin upload file size limit from the default 2MB to 512MB+, adjust 4 core PHP directives in your active php.ini file: set upload_max_filesize = 512M, post_max_size = 512M, memory_limit = 512M, and max_execution_time = 300. In cPanel, navigate to Select PHP Version > Options or MultiPHP INI Editor to apply these values in 1-click.
Why Does phpMyAdmin Default to a 2MB Upload Limit?
By default, vanilla PHP installations restrict file uploads to 2MB (upload_max_filesize = 2M) to prevent unauthorized users from exhausting server memory buffers during HTTP POST requests. However, modern WordPress databases with years of blog posts, WooCommerce transactions, and page builder data routinely exceed 50MB to 500MB, triggering the frustrating “No data was received to import” or “File exceeds maximum allowed size” errors in phpMyAdmin.
Method 1: Increasing Upload Limits in cPanel (Shared Hosting)
- Log in to your CpanelFree dashboard and scroll to the Software section.
- Click on MultiPHP INI Editor (or Select PHP Version > Options).
- Select your home directory or specific domain from the dropdown menu.
- Locate and update the following four values:
upload_max_filesize: 512Mpost_max_size: 512M (Must always be equal to or greater than upload_max_filesize)memory_limit: 512Mmax_execution_time: 300 (Seconds)
- Click Apply. Re-open phpMyAdmin, and the import screen will now display “(Max: 512MiB)”.
Method 2: Increasing Limits in Linux VPS (Ubuntu / Debian / Nginx / Apache)
On dedicated or cloud VPS instances, edit the master PHP-FPM configuration file using your preferred terminal editor:
sudo nano /etc/php/8.3/fpm/php.ini
Search for and update the directives:
upload_max_filesize = 512M post_max_size = 512M memory_limit = 512M max_execution_time = 300 max_input_time = 300
Updating Nginx Client Body Buffer Limit (client_max_body_size)
If your VPS runs Nginx reverse proxy, Nginx enforces its own independent upload restriction (default 1MB). Add this line inside the http { ... } or server { ... } block in /etc/nginx/nginx.conf:
client_max_body_size 512M;
Restart PHP-FPM and Nginx to load the changes:
sudo systemctl restart php8.3-fpm sudo systemctl restart nginx
Method 3: Increasing Limits via .htaccess or .user.ini
On Apache servers running PHP as an Apache module or via FastCGI, add these rules to your root .htaccess file:
php_value upload_max_filesize 512M php_value post_max_size 512M php_value memory_limit 512M php_value max_execution_time 300 php_value max_input_time 300
🔗 Recommended Related Technical Guides:
Understanding max_input_vars and Memory Fragmentation in phpMyAdmin
In addition to file size directives, importing complex multi-table SQL backups containing thousands of WooCommerce attributes or translated taxonomy terms can trigger truncated input errors. In your php.ini, increase the max_input_vars limit from the default 1000 to 5000:
max_input_vars = 5000 max_input_time = 600
Bypassing Browser Timeouts with Gzip Compressed Imports
Instead of uploading raw uncompressed .sql files (which waste upload bandwidth and trigger HTTP socket timeouts), always compress your SQL dumps into .sql.gz or .sql.zip format prior to uploading. phpMyAdmin automatically detects compressed archives, decompresses them in memory on the fly, and reduces initial network upload payload by up to 85%.
Diagnostic Checklist for phpMyAdmin Upload Errors
- ✅ Verify upload_tmp_dir: Ensure the Linux temporary upload directory (
/tmp) has free disk space and write permissions (chmod 1777 /tmp). - ✅ Check Post Max Size Alignment: Confirm
post_max_sizeis set strictly equal to or larger thanupload_max_filesize. - ✅ Restart Web Daemons: Always reload PHP-FPM and Nginx/Apache after editing configuration files.
Comparing Upload Limits Across Common Web Control Panels
| Control Panel | Default Limit | Configuration Location | Restart Required? |
|---|---|---|---|
| cPanel / WHM | 50 MB | MultiPHP INI Editor / Tweak Settings | No (Automatic) |
| CyberPanel | 2 MB | PHP > Edit PHP Configs | Yes (LSCache/LSPHP) |
| CloudPanel | 100 MB | PHP Settings > Memory & Uploads | No (Instant) |
Why does phpMyAdmin throw a 413 Request Entity Too Large error?
This error is generated by the Nginx reverse proxy layer, not PHP. Adding client_max_body_size 512M; inside /etc/nginx/nginx.conf immediately resolves the issue.
By properly scaling your upload limits across PHP, web server daemons, and database buffers, you ensure smooth database migrations and uninterrupted site administration.
Deploy Generous Resource Limits on CpanelFree
Enjoy high PHP upload limits, phpMyAdmin management, free AutoSSL, and high-speed NVMe storage at 100% zero cost on CpanelFree.
Frequently Asked Questions
Why does phpMyAdmin still show 2MB after updating upload_max_filesize?
phpMyAdmin selects the smaller value between upload_max_filesize and post_max_size. If you set upload to 512M but post_max_size remains 2M, the limit will stay 2MB. Ensure both directives are updated identically.
What is the fastest way to import databases larger than 1 GB?
For multi-gigabyte databases, bypass HTTP web interfaces entirely and import directly through SSH using the command: mysql -u db_user -p db_name < backup.sql.
Troubleshooting phpMyAdmin Session Expired Errors
If phpMyAdmin logs you out during long database imports, increase the session expiration timeout in php.ini: session.gc_maxlifetime = 3600. This keeps your administrative session active for up to 60 minutes continuously.

