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
.zipor.sql.gzfiles. Compressing a 100MB text.sqlfile 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.
- Download
bigdump.phpfrom the official BigDump project page. - Open
bigdump.phpin a text editor and enter your database connection details (database name, user, password). - Upload both
bigdump.phpand your large.sqlfile to your server folder via File Manager. - Access
yourdomain.com/bigdump.phpin your browser and click Start Import. - BigDump will process a small batch of queries at a time, continually refreshing until complete.
- ⚠️ Crucial Security Step: Delete
bigdump.phpand your.sqlfile 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.
- Upload your
.sqlor.sql.gzfile to your server home directory via cPanel File Manager or FTP. - Open a support ticket letting us know the location of the uploaded file and the target database name.
- Our engineering team will run the import directly in the terminal, bypassing web limitations entirely!