1. How to backup a MySQL database

  2. How to restore a MySQL database from a backup

How to backup a MySQL database 

You can make a backup of your WordPress website database in the phpMyAdmin section of a hosting control panel. Login to your cPanel, go to Databases → phpMyAdmin:

This is how the phpMyAdmin section looks like:

Select the database you would like to backup from the left navigation sidebar. 

IMPORTANT: 'information_schema' is a system database, please keep it as is for correct work.

'origalis_wp' is our example website database. 

If you have more than one website database, you may want to check the website name connected to a database in its 'prefixname_options' table. The default prefix set for our example database is 'wp_', so we need to check 'wp_options' table :

Click the database name you'd like to backup and then click the Export tab:

Tick on the Quick export method and click Go. Database export file will be saved on your computer.

How to restore a MySQL database from a backup

Select the database you want to restore from the left navigation sidebar.

To avoid creating duplicated tables, you need to remove all tables from the database first. Scroll down the list of your database tables, click the Check All checkbox, then click With selected: Drop.

Confirm by clicking Yes.

Click the Import tab.

Click the Choose File button to browse for the MySQL backup.

Choose the exported file of your database.

Click Go.

Once you see the 'Success' message, the database has been imported.

Did this answer your question?