Importing a Database
Importing a database is essential when migrating a website from another host, restoring a backup, or setting up a local development copy on your live server. SillyHost supports database imports through phpMyAdmin and the command line.
Importing via phpMyAdmin
- Open phpMyAdmin from your cPanel.
- Click on the database name in the left sidebar where you want to import the data. If the database does not exist yet, create it first in cPanel.
- Click the Import tab at the top.
- Click Choose File and select your SQL file from your computer.
- Ensure the format is set to SQL.
- Leave the default settings unless you have specific requirements.
- Click Go to start the import.
Import File Size Limits
phpMyAdmin has an upload limit of approximately 50MB to 128MB depending on server configuration. If your database file exceeds this limit, you have several options:
- Compress the file – phpMyAdmin accepts
.sql.gzand.sql.zipfiles, which are much smaller. - Split the file – Use a tool like BigDump or split the SQL file into smaller parts.
- Contact support – Our team can import large databases for you via the command line.
Common Import Errors
- Table already exists – The database is not empty. Either drop the existing tables first or add
DROP TABLE IF EXISTSstatements to your SQL file. - Unknown character set – Ensure the character set in your SQL file matches your database. UTF-8 (
utf8mb4) is recommended. - Syntax error – The SQL file may be corrupt or from an incompatible MySQL version. Verify the file integrity and check for version compatibility.
- Max execution time exceeded – The import is taking too long. Try compressing the file or splitting it into smaller parts.
After Importing
After a successful import, verify the data by browsing the tables in phpMyAdmin. If you are migrating a website, update the database connection details in your website's configuration file (e.g., wp-config.php for WordPress) to use the new database credentials.