How to Import a Database Using phpMyAdmin

Import an SQL backup into the intended database using phpMyAdmin, with checks to avoid overwriting live website data.

Open cPanel for the intended hosting service before launching phpMyAdmin. Identifying service details are excluded. Open cPanel for the intended hosting service before launching phpMyAdmin. Identifying service details are excluded.

Prepare a safe destination

Importing runs instructions from the backup file. Those instructions can create, replace or remove tables and data. Use a backup from a trusted source and keep an unchanged copy.

Prefer a new, empty destination database when preparing a migration or testing a restore. Create databases and database users through cPanel’s database-management tools so they are associated with your hosting account. Assign the intended user the permissions required by the application.

Before importing into an existing database, take a separate verified export and plan for downtime or a write freeze if the application continues accepting orders or changes. Do not assume an import automatically merges new data safely.

Select the database and import

  1. Open phpMyAdmin from cPanel. It may open in a new tab.
  2. Select the intended destination database in the navigation panel. Confirm the full name before continuing; several databases can look similar.
  3. Choose the Import tab at database level.
  4. Use Choose File or Browse to select the SQL backup from your computer. A full account archive or a WordPress XML content export is not the same as a database SQL dump.
  5. Check the displayed upload limit and the selected format. For an ordinary SQL export, choose SQL and retain the default options unless the source requires a documented change.
  6. Review the selected database and file, then start the import using the displayed Import or Go button.
  7. Wait for the result and record any error. Do not close the page or submit the same job again while it is still running.

After a successful import

Check that the expected tables exist and that the application uses the intended database name, user and password. An import does not automatically update the website’s configuration or copy its files.

For a migration, test the website carefully before changing public DNS. Domain changes can require application-aware URL updates; WordPress may contain serialised data that must not be changed with a blind text replacement.

Keep database exports outside publicly accessible website directories. Store any downloaded copy securely because it may contain personal data, password hashes and business records.

Common import errors

File too large or timeout: contact support about a suitable import method. Raising your website’s PHP upload limit may not change the limits used by cPanel’s phpMyAdmin service.

Table already exists: stop and check whether you selected a non-empty or incorrect database. Do not drop tables merely to make the error disappear.

Unknown collation or SQL syntax error: the source and destination database versions or export options may differ. Preserve the original dump and send the first complete error to support. Do not repeatedly import over a partially completed database.

Tell us the affected domain, destination database and error through a private support ticket. Never publish the SQL file or include login credentials.

Related help

Further information: phpMyAdmin: Import and export · cPanel: Database management.

Need help? Open a support ticket with the affected domain and exact error. Never include your password.

Was this article helpful?
Still need help? Open a support ticket and our team will assist you directly.
Open a Ticket

Powered by WHMCompleteSolution