In this article, AZDIGI will help you understand how to get a website’s database on cPanel hosting.
The database is an extremely important component of a website, a project, an application… And since it is an essential part, regular storage and backup are extremely necessary.
However, most newbies do not yet know how to operate and will need assistance from Technical Team.
Understanding customer needs, today AZDIGI will guide you on how to get the website’s database on cPanel hosting.
II. How to get the website’s database on cPanel hosting
Unlike the website source code, we only need to compress the source code with a file management tool that makes backing up the source code much simpler.
In this tutorial, I will show you how to get the website’s database on cPanel hosting in 3 different ways and the complexity will increase gradually.
Method 1: Download the database from the Backup feature
This is the simplest way we can get the database. First, we will access Backup feature as shown below:
After accessing this feature, you will see
Download a MySQL Database Backup as shown below:
There are 2 databases on this hosting, so the list shows 2 databases. If you have more websites or databases, this list will show all your databases.
You just need to click on the name of the database to download, then the browser will automatically download that database to your personal computer. Pretty simple, isn’t it?
Method 2: Export database from phpMyAdmin
In this way, you will need to access the phpMyAdmin feature as shown below:
At phpMyAdmin, click on the database you want to download, and then select
Go and the database will automatically be downloaded.
Method 3: Export the database with the command at Terminal
Hosting at AZDIGI all open a Terminal command window, so you can use commands:
WP-CLI to Export the database.
You can find this feature on cPanel.
After accessing this feature, you can use the following command to export the database:
mysqldump -u mysql_user -p database_name > file_name.sql
You need to change the contents of
file_name.sql according to the correct database-connection information. After entering this command, you need to enter the password of the corresponding
mysql_user, the database will be exported successfully and saved at the root of
If you have WordPress websites on your hosting package, you can use the command
cd ten_thu_muc to move into that website’s directory. And then, you use the following WP-CLI command to export the database quickly.
wp db export
. The database when exported will automatically assign the time to the name, so you can set the Cron Job to schedule automatic backups with this command.
Thus, AZDIGI has shown you 3 ways to get the website’s database on cPanel hosting. Depending on your needs, you can choose the most suitable method.
Hope this article is useful to you. Wishing you success!
See more useful cPanel articles at the following link:
If you need support, you can contact support in the ways below: