Exporting and importing databases is how you move a site between hosts, take a manual backup, or restore data after a change. phpMyAdmin handles both through the browser.
Export a Database
- Open phpMyAdmin from the Databases section in cPanel.
- Click the database name in the left sidebar to select it.
- Click the Export tab at the top.
- Leave the method on Quick and the format on SQL.
- Click Export. A
.sqlfile downloads to your computer.
For very large databases, choose the Custom method and enable "Save output to a file" with gzip compression to reduce the file size.
Import a Database
Before importing, create an empty database and user in MySQL Databases if you do not already have one.
- In phpMyAdmin, select the target database in the left sidebar.
- Click the Import tab.
- Click Choose File and pick your
.sqlfile. - Leave the format as SQL and click Import.
The page confirms success when the import finishes.
Handling Large Files
phpMyAdmin has an upload size limit, often around 50 MB. If your file is larger:
- Compress it to
.sql.gzbefore uploading, which often brings it under the limit. - Or upload the
.sqlfile to your account with File Manager and use the command line if you have terminal access.
| Symptom | Likely cause | |----------------------------|---------------------------------------| | "Table already exists" | Importing into a non-empty database | | Upload stops part way | File exceeds the upload size limit | | "Unknown collation" | Source and target MySQL versions differ |
If imports keep failing on size, contact support on WhatsApp at +254 796 358081 and the file can be imported server-side for you.