How to migrate a MySQL database to UnderHost
Export a MySQL database from your old host using phpMyAdmin or mysqldump, then import it into your new UnderHost cPanel account.
On this page
Moving a MySQL database is a core part of any website migration. WordPress, Joomla, and most CMS platforms store all content (posts, settings, users) in the database-files alone are not enough.
Export from old host
Via phpMyAdmin (small databases, under ~50 MB):
- Log in to your old host's cPanel → phpMyAdmin
- Select your database in the left panel
- Click Export at the top
- Method: Quick, Format: SQL
- Click Go-save the .sql file
Via SSH/command line (large databases):
mysqldump -u username -p database_name > backup.sql
Compress large exports: mysqldump -u username -p database_name | gzip > backup.sql.gz
Create the database on UnderHost
- Log in to UnderHost cPanel → MySQL Databases
- Create a new database (e.g.,
newdb) - Create a new database user and password
- Add the user to the database with All Privileges
- Note the full database name (e.g.,
username_newdb) and username (username_user)
Import the database
Via phpMyAdmin (files under ~50 MB):
- UnderHost cPanel → phpMyAdmin
- Select the new database in the left panel
- Click Import
- Choose the .sql file
- Click Go
For large databases (via SSH on VPS, or cPanel File Manager + command line):
mysql -u username_user -p username_newdb < backup.sql
WordPress URL search-replace
If your WordPress site's URL changes during (e.g., old host used a different domain or temp URL), you must update all URL references in the database. Use WP-CLI:
wp search-replace 'https://old-domain.com','https://new-domain.com' --all-tables
Or use the Search Replace DB PHP script-upload it to your server, run it in the browser, then delete it immediately after.
Verify the migration
- Update your application's database config to the new credentials (e.g., wp-config.php)
- Browse the site via a temporary URL or hosts file preview
- Check that posts, pages, products, and settings are all present
- Log in to the admin panel to confirm authentication works
Let us handle the migration
Request a free migration and our team will transfer your database for you.





















