Skip to content
Databases3 min read

Fix "file too large" when importing in phpMyAdmin

You probably tried to upload a file that is too large. Please refer to the documentation for a workaround for this limit.

Short answer

phpMyAdmin runs on PHP, and your file is bigger than the upload limit (upload_max_filesize and post_max_size) shown next to the file picker. The quickest fix is compressing it as .sql.gz or .zip; if it's still too big, split it or import it over SSH with the mysql command.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Causes
  2. Fixes, from easiest to most powerful
  3. Why editing php.ini isn’t enough
  4. Prevention
  5. On ArabyHost

phpMyAdmin is a PHP application, so an upload passes through PHP’s limits: upload_max_filesize and post_max_size for size, then max_execution_time and memory_limit while the file is processed. The current limit is printed on the Import page next to the file picker as (Max: ...MiB). The same problem can also show up as:

No data was received to import. Either no file name was submitted, or the file size
exceeded the maximum size permitted by your PHP configuration.

Causes

  • The SQL file is bigger than the upload limit.
  • The file is under the limit, but the import runs past the time limit and stops halfway.
  • PHP doesn’t have enough memory to process the file.
  • The web server’s own request size limit, which sometimes shows a 413 error instead of phpMyAdmin’s message.

Fixes, from easiest to most powerful

1. Compress the file

phpMyAdmin accepts .sql.gz, .sql.bz2 and .zip (one file inside) and decompresses them on import. SQL dumps are plain text, so they shrink a lot:

gzip -9 backup.sql
# result: backup.sql.gz

On Windows, any archiver can create a .zip or .gz. Note that the limit applies to the compressed file.

2. Export in parts

On the source database open Export → Custom, select a group of tables at a time, and export the biggest tables to files of their own. Before exporting, clear out disposable data such as log tables or old sessions; it can shrink the dump considerably.

3. Use partial import

On the Import page, enable Allow the interruption of an import in case the script detects it is close to the PHP timeout limit. If the import stops, phpMyAdmin tells you how many queries ran; upload the same file again and enter that number in Skip this number of queries to carry on where it left off.

4. Use the command line over SSH

There’s no browser upload limit here. Upload the file to your account with File Manager or FTP, then:

mysql -u cpuser_shop -p cpuser_shop < backup.sql
# or for a compressed file
gunzip < backup.sql.gz | mysql -u cpuser_shop -p cpuser_shop

5. A staggered import script

Tools such as BigDump import the file in small batches across successive requests, so no single request hits the time limit. Upload the script and the dump with File Manager, run it, then delete the script as soon as you’re done, since it holds your database credentials.

Why editing php.ini isn’t enough

In cPanel, phpMyAdmin runs on cPanel’s own PHP, not your site’s settings. Changing upload_max_filesize in MultiPHP INI Editor only changes your site’s limit. phpMyAdmin’s limit is set by the server administrator in WHM, which is why the fixes above are the practical route on shared hosting.

Prevention

On ArabyHost

Databases run on MariaDB/MySQL with phpMyAdmin, and cPanel opens with one click from the Araby Panel. On AI/Developer plans you can import large dumps over SSH with the mysql command, as in the SSH access guide. On other plans, use compression, splitting or partial import. If you’re moving a whole site from another host, ask for free migration help.

FAQ

Does phpMyAdmin accept compressed files?

Yes: .gz, .bz2 and .zip, decompressed during the import. The limit applies to the compressed size, and text SQL dumps compress very well.

I raised upload_max_filesize but phpMyAdmin's limit didn't change. Why?

phpMyAdmin inside cPanel runs on cPanel's own PHP settings, not your site's. Use compression, splitting or the command line instead.

The import stopped halfway. Do I start over?

If you enabled partial import, phpMyAdmin tells you where it stopped and you continue from there. Otherwise use an empty database or drop the half-imported tables, so you don't hit Duplicate entry errors.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.