Print

How to Import and Export Databases via phpMyAdmin (Quick Guide for Backups & Migrations)

Whether you’re migrating a website, backing it up, or restoring from a saved version, phpMyAdmin gives you powerful tools to import and export databases directly from your browser — no command line required.

In this guide, you’ll learn how to export a database for backup and import a database into phpMyAdmin for restoration or migration.


✅ Why You Might Need to Import/Export Databases

  • 📦 Backup your website database before updates or changes
  • 🚀 Migrate a site from one host to another
  • 🛠️ Restore from a saved copy
  • 🧪 Move staging data to a live site or vice versa

phpMyAdmin makes these tasks easy, even for beginners.


📤 How to Export a Database via phpMyAdmin

Step 1: Log in to cPanel

Access your cPanel dashboard (yourdomain.com:2083) and click on phpMyAdmin under the Databases section.

Step 2: Select Your Database

In the left sidebar, click the database name you want to export. You’ll see a list of its tables in the main window.

Step 3: Click the Export Tab

  • Choose Quick for a simple export with default settings.
  • Choose Custom if you want to select specific tables, formats, or compression options.

Step 4: Click Go

A .sql file will download to your computer — this is your backup file.

💡 Save this file in a secure location for future restoration.


📥 How to Import a Database via phpMyAdmin

Step 1: Log in and Open phpMyAdmin

From cPanel, go to phpMyAdmin.

Step 2: Create a New Empty Database

You must create the destination database first (via MySQL Databases in cPanel).
Make note of the database name (e.g., user_wpdb).

Step 3: Select the Empty Database

In phpMyAdmin, click the newly created database from the left panel. Make sure no tables exist inside it before proceeding.

Step 4: Click the Import Tab

  • Click Choose File and select your .sql file
  • Leave format as SQL
  • Click Go

phpMyAdmin will now import the database and show a success message when finished.


⚠️ Common Issues & Fixes

IssueSolution
File too largeSplit the SQL file or ask your host to increase upload size
Collation mismatchSet the correct collation when creating the database
Tables already existDrop existing tables before import or import into a clean DB
Access deniedEnsure your cPanel database user has the correct permissions

🛡️ Pro Tips

  • Always export before making major changes to your website
  • Compress large SQL files into .zip before import if allowed
  • Use Custom Export to exclude tables like logs or cache
  • Match prefixes if importing into WordPress (e.g., wp_)

Importing and exporting MySQL databases with phpMyAdmin is a quick, reliable way to back up and transfer your site data. With just a few clicks, you can ensure your website is safe, portable, and recoverable whenever needed.

Have trouble importing or exporting your database? Let our expert support team assist you — click here to contact us.

Table of Contents