Have a Question?

If you have any question you can ask below or enter what you are looking for!

Troubleshooting Large Database Imports in phpMyAdmin

Why phpMyAdmin Times Out During Big Imports

Web-based tools like phpMyAdmin are designed for quick web requests, not long-running data operations. When importing database files larger than 50MB–100MB, the web server’s PHP execution timeout limit (e.g., 60 seconds) is often reached before the import finishes. This leads to frustrating errors like “Server Disconnected” or “504 Gateway Timeout”.

Here are 3 tested solutions to bypass web timeout limits:

1: Compress or Split Your SQL File

  • Compress the File: phpMyAdmin accepts .zip or .sql.gz files. Compressing a 100MB text .sql file can often reduce its size to under 15MB, allowing it to upload before timeouts occur.
  • Split the File: Use a free desktop tool like SQLDumpSplitter (Windows) or sqlsplit (Mac/Linux) to divide a massive SQL dump into smaller, manageable chunks (e.g., 10MB each) and import them sequentially.

2: Use BigDump (Staged Import Script)

BigDump is a lightweight, open-source PHP script specifically built to import large MySQL dumps without hitting server execution limits.

  1. Download bigdump.php from the official BigDump project page.
  2. Open bigdump.php in a text editor and enter your database connection details (database name, user, password).
  3. Upload both bigdump.php and your large .sql file to your server folder via File Manager.
  4. Access yourdomain.com/bigdump.php in your browser and click Start Import.
  5. BigDump will process a small batch of queries at a time, continually refreshing until complete.
  6. ⚠️ Crucial Security Step: Delete bigdump.php and your .sql file immediately after the import finishes!

3: Request a Command-Line Import via Support (Easiest & Safest)

For database files exceeding 100MB, the command line via SSH is the fastest and safest approach.

  1. Upload your .sql or .sql.gz file to your server home directory via cPanel File Manager or FTP.
  2. Open a support ticket letting us know the location of the uploaded file and the target database name.
  3. Our engineering team will run the import directly in the terminal, bypassing web limitations entirely!