phpMyAdmin Import Fails: File Too Large or Script Timed Out
Large database files will not import. Use compression, raise limits or import in parts.
Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
phpMyAdmin has size and time limits for imports.
Options
- Compress the SQL file as a zip or gzip. phpMyAdmin can import compressed files, which is often enough.
- Raise PHP limits (
upload_max_filesize,post_max_size,max_execution_time) in your hosting panel. See our upload guide. - Ask your host to import it, or use their import tool.
- Split the file into parts with a trusted tool, then import in order.
- Use the command line (SSH), if your plan offers it, with the
mysqlclient.
Before importing
- Create an empty database and user, with the right privileges.
- Check the character set matches.
- Back up an existing database first. See our backup guide.
Errors
"Error establishing connection" after import: see our database guide.
Related guides
- Lost Your WordPress Site and Have No Backup: Ways to Recover Content
- How to Create a WordPress Staging Site and Test Updates Safely
- How to Back Up and Restore a WordPress Site (Simple Method)
- A 30-Minute Update Day Routine That Prevents Most Website Emergencies
Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.