How to export a database in cPanel (phpMyAdmin)
An export (dump) is a .sql file with all tables and data of a database. You need it before updating the CMS or plugins, before moving the site to another host, and to hand a copy of the database to a developer.
Which database the site uses
The database name is in the site settings file: in WordPress it is the line define('DB_NAME', ...) in wp-config.php. All databases of the account are listed in "Manage My Databases". The name always starts with the account prefix, for example example_wp.
With phpMyAdmin
- Open "phpMyAdmin".
- Select the database on the left.
- Open the "Export" tab.

- "Export method" - "Quick".
- "Format" - SQL.
- Click "Export". The file downloads to your computer.

The "Custom" method shows more options:
- gzipped compression - the file is several times smaller and downloads faster;
- table selection - export only the tables you need instead of the whole database;
- adding DROP TABLE statements - when the dump is loaded into a non-empty database, old tables are replaced instead of causing a "table already exists" error.
A single table can also be exported this way: click it on the left and open the "Export" tab.
With Backup
In "Backup" (group "Files"), block "Download a Database Backup", click the database name to download its dump as .sql.gz. For large databases this way is more reliable: the dump is prepared in full and does not break off halfway, as browser exports sometimes do.

Check the dump
Open the file in a text editor (unpack .sql.gz first): near the top there should be CREATE TABLE lines, followed by INSERT INTO lines with data. A file of a few kilobytes for a live site database means the export broke off or the wrong database was chosen.
A dump contains all site data, including users and orders. Do not leave it in public_html - download it to your computer and delete it from the hosting. Keep it as carefully as passwords.
Common mistakes
- CSV format was chosen instead of SQL - such a file cannot be loaded back as a database.
- The wrong database was exported: the account has several, the right one is named in the site settings.
- The dump for a shop move was made in advance - orders placed after the export are not in it. Make the dump as the last step, right before switching the domain.
To load a dump back, see importing a database.