How to Fix phpMyAdmin Import Timeout Errors
Getting 'Script timeout passed' when importing SQL files? Here's how to actually fix it without touching server settings.
You're trying to import a database backup through phpMyAdmin and it just dies. 'Script timeout passed, if you want to finish import, please resubmit the same file and import will resume.' Sound familiar?
Why this happens
phpMyAdmin runs as a PHP script. PHP has execution time limits (usually 30-300 seconds). When your import takes longer than that limit, PHP kills the script.
Most shared hosting providers set this low to prevent runaway scripts from hogging server resources. And they usually won't let you change it.
The solutions (from easiest to hardest)
1. Split the file (works on any hosting)
This is the most reliable fix. Break your big SQL file into smaller chunks, then import each one. Each import finishes before the timeout hits.
You can use SQLSplit to do this in your browser — just drop your file in and choose how many lines per chunk. 10,000 lines usually works well for phpMyAdmin.
2. Use the command line (if you have SSH access)
If you have SSH access to your server, skip phpMyAdmin entirely:
mysql -u username -p database_name < your_file.sqlThis runs directly on the server with no PHP timeout. It's faster too.
3. Increase PHP limits (if you control the server)
If you have access to php.ini or .htaccess, you can bump up the limits:
max_execution_time = 600
max_input_time = 600
memory_limit = 512M
post_max_size = 256M
upload_max_filesize = 256MBut on shared hosting, these are usually locked down. That's why splitting the file is often your only option.
How big is too big?
There's no exact number, but as a rule of thumb:
- Under 10MB: Usually imports fine
- 10-50MB: Might timeout on slow hosts
- 50-200MB: Will almost certainly timeout
- Over 200MB: Don't even try phpMyAdmin
If you're dealing with files over 200MB, use command line import or split into many small chunks.
The 'resume' feature doesn't always work
phpMyAdmin claims it can resume imports. In practice, this is flaky. It works by tracking which line it reached, but if your SQL has transactions or foreign key constraints, a partial import can leave your database in a broken state.
Splitting the file properly — so each chunk is a complete, valid SQL file — is more reliable than trusting the resume feature.
Frequently Asked Questions
How do I increase phpMyAdmin timeout?
You need to increase PHP's max_execution_time in php.ini or .htaccess. On shared hosting, this is often not possible. The alternative is to split your SQL file into smaller chunks.
Can phpMyAdmin import large files?
phpMyAdmin struggles with files over 50MB due to PHP execution limits and upload size restrictions. For large imports, use command line MySQL or split the file first.
Why does phpMyAdmin keep timing out?
PHP has a max_execution_time setting that kills scripts running too long. Large SQL imports exceed this limit. Split your file into smaller chunks or use command line import.