Tutorial··5 min read

How to Import Large SQL Files in cPanel (When phpMyAdmin Fails)

Your hosting's phpMyAdmin keeps timing out. Here are the actual ways to get that big database imported.

You have a cPanel hosting account, a big SQL file, and phpMyAdmin that keeps dying. Here's how to actually get your database imported.

Option 1: Split and import through phpMyAdmin

The simplest approach that works on any cPanel host. Break your SQL file into chunks small enough for phpMyAdmin to handle.

  1. Split your SQL file into 10MB chunks (or smaller if your host is slow)
  2. Go to phpMyAdmin, select your database
  3. Import the first chunk
  4. Repeat for each remaining chunk

Yes, it's manual. But it works reliably when nothing else does.

Split your SQL file

Break it into phpMyAdmin-friendly chunks.

Open SQLSplit

Option 2: Use cPanel's MySQL import (if available)

Some cPanel setups have a separate MySQL import tool under 'MySQL Databases' that handles larger files better than phpMyAdmin. Look for an 'Import' button there.

This bypasses PHP limitations and talks directly to MySQL. Not all hosts enable it though.

Option 3: SSH and command line

If your cPanel has SSH access enabled (check under 'Terminal' or 'SSH Access'):

# Upload your SQL file via File Manager first, then:
mysql -u cpanel_username -p database_name < /home/username/yourfile.sql

Your MySQL username in cPanel is usually your cPanel username with a prefix like 'cpanel_'. Check under 'MySQL Databases' for the exact name.

Option 4: Remote MySQL connection

Some hosts let you connect to MySQL remotely. In cPanel, look for 'Remote MySQL' and add your IP address. Then from your local machine:

mysql -h yoursite.com -u cpanel_username -p database_name < local_file.sql

This can be slow over the internet but handles any file size.

What usually works

In my experience with various shared hosts (SiteGround, Bluehost, Hostinger, GoDaddy, etc.):

  • Under 50MB: phpMyAdmin usually works
  • 50-200MB: Split into 10MB chunks, import each
  • Over 200MB: Need SSH or ask your host to import it

If you're moving a big WordPress or Magento database, splitting is usually your best bet unless you have SSH access.

Tip: Import order matters

When importing split files, do them in order (part_1, part_2, etc.). SQL files often have table creation before data insertion, and foreign key constraints need tables to exist first.

Good splitting tools keep table definitions in the first chunk and maintain statement integrity across chunks.

Frequently Asked Questions

What's the maximum file size for phpMyAdmin import in cPanel?

It varies by host, but typically 50MB to 100MB. The practical limit is lower due to PHP execution timeouts, usually around 30-50MB for reliable imports.

Can I import SQL files through cPanel File Manager?

File Manager is for uploading files, not importing to MySQL. After uploading, you need to use phpMyAdmin, SSH, or the MySQL import tool to actually import the data.

Why is my database import so slow on shared hosting?

Shared hosting has limited CPU and memory allocated to your account. Large imports compete with PHP limits and other users on the server. Splitting into smaller chunks and importing sequentially is more reliable than one large import.

Related articles

View all

Advertisement