How to Backup a Database With phpMyAdmin
Regularly creating backups of your website files is highly recommended. This is helpful if there are server or network problems. You also have the option to restore your website files to previously working versions. In this guide, you’ll learn how to backup your database and restoring your website files to your database via phpMyAdmin.
How to Backup a Database With phpMyAdmin
To create backup files using the phpMyAdmin feature, follow the steps below.
- Log in to your cPanel.
- On the Home page, click Databases or the [ v ] arrow symbol. Then, click the phpMyAdmin option.
Note: At the next page, you will get the following notification:
The system will redirect you in a moment.
This will only last for a few seconds, and then you will be redirected to the phpMyAdmin control panel. - At the main phpMyAdmin page, on the left side, you will find a navigation panel. Find your hosting username and click the [+] plus sign beside it to access the drop-down menu. This will give you a list of your databases.
- Find the database you want to create a backup copy of, and click it. This will open the database table.
- Select the tables you want to download, or go to the bottom of the table and click Check All to select the entire database.
- Then on the top menu bar, click Export.
- Next page, under Export Method, select how you want your backup file to be downloaded. Choose the Quick option if you are sure you have selected all the tables you want to create backup copies of.
- Make sure to choose the SQL format in the Format field. Then, click the Go button.
The database backup will then be automatically saved on your computer. The backup file will have the .sql file extension.
If Custom - display all possible options
If you want to remove or add some tables, you can do the following instead:
- Under the Export Method, choose the Custom option if you want to remove or add some tables.
- Under the Save output to a file in the Output section, select your choices for the following fields:
File name template This will set the name of the backup file you will create and download.
Default value is @DATABASE@, which will become hostingusername_database when downloaded.
You can also choose to type any name, without the (@) at symbol in the field instead.Character set of the file This is the character setting of the file that you are going to download. The default value utf-8 is the most commonly used character setting on the internet today. Compression This will set what type of compressed file your backup copy will be. - Make sure to choose the SQL format in the Format field.
- Below the Format field are further options you can also choose to set. By default, though, the blanks and checked options under Format-specific options are already set for a basic backup file creation.
- Click the Go button.
The database backup will then be automatically saved on your computer. The backup file will have the .sql file extension.
Congratulations! you now know how to backup a database with phpMyAdmin.
How to Restore a Database Backup With phpMyAdmin
If you want to know how to restore a database backup with phpMyAdmin, follow the steps below.
- Log in to your cPanel.
- On the Home page, click Databases or the [ v ] arrow symbol. Then, click the phpMyAdmin option.
Note: At the next page, you will get the following notification:
The system will redirect you in a moment.
This will only last for a few seconds, and then you will be redirected to the phpMyAdmin control panel. - At the main phpMyAdmin page, on the left side, you will find a navigation panel. Find your hosting username and click the [+] plus sign beside it to access the drop-down menu. This will give you a list of your databases.
- Find the database you want to restore to a previous version, and click it. This will open the database table.
- On the top menu bar, click Import.
- Next page, under File to Import, click Choose File and locate the database backup file you want to use.
Note: Unless your database has a specifically different character set, don’t replace the default utf-8. Then, click Go.
- On the next page, if the process is successful, you will get the following notification: √ Import has been successfully finished, (number of) queries executed. (table_name.sql)
Congratulations! You now know how to restore a database backup with phpMyAdmin. If you have any questions, or if you need any further assistance in backing up your database with phpMyAdmin, please let us know. We’d love to help!