Most dynamic sites store content in a MySQL database, so the database must move alongside the files. The standard tool on cPanel is phpMyAdmin, which handles export and import through the browser.
Export From the Old Host
- Open phpMyAdmin on your current host and select the database.
- Click Export and choose the Quick method with SQL format.
- Download the resulting .sql file.
For large databases, use the Custom export and enable compression, or request a full backup so the file transfers more reliably.
Create the Database on cPanel
- In the new cPanel, open MySQL Databases.
- Create a new database. cPanel adds your account name as a prefix.
- Create a database user and add it to the database with all privileges.
Import the Data
- Open phpMyAdmin on the new host and select the new database.
- Click Import and upload your .sql file.
- Wait for the success message before closing the tab.
Update Connection Settings
Your site config must point to the new database. Update these values:
DB_HOST=localhost
DB_NAME=newprefix_yourdb
DB_USER=newprefix_youruser
DB_PASSWORD=yourpassword
Note that cPanel prefixes both the database name and the username, so they will differ from the old server even if you reuse the same base names.
Verify the Site
- Load a page that reads from the database, such as a blog post or product listing.
- Test a write action like submitting a form to confirm the user has full privileges.
- Watch for connection errors that signal a wrong host, name, or password.
If a very large import times out in phpMyAdmin, the migration team can import it directly on the server instead.