Load a .sql backup from your old host or your computer into a Twerple database.
When you move a website to Twerple, you usually bring its database with you as a .sql file, sometimes compressed as .sql.gz or .zip.
Importing with phpMyAdmin
- Create an empty database for it, if you have not already.
- Open the database in phpMyAdmin.
- Click the Import tab.
- Click Choose File and select your
.sql,.sql.gzor.zipfile. - Leave the other settings as they are and click Import (or Go).
- When it finishes, the tables appear on the left.
If the file is too large
phpMyAdmin limits the size of files you can upload. If yours is over the limit:
- Compress it first: a
.sql.gzfile is often ten times smaller. - If your plan includes SSH, upload the file with SFTP and import it from the command line:
mysql -u example_shop -p example_shop < backup.sql
- Or open a support ticket, tell us where you have uploaded the file and which database it is for, and we will import it for you.
Common errors
- "Table already exists": the database is not empty. Import into a new, empty database, or delete the existing tables first.
- "Access denied ... CREATE DATABASE": the file tries to create its own database. Remove the
CREATE DATABASEandUSElines near the top of the file and import it again. - Odd characters after import: the file was exported with a different character set. Re-export it from your old host as
utf8mb4.
After importing, update your website's configuration with the new connection details.