One simple task every webmaster should learn is backing up MySQL databases. When you’re managing a website or IT system, you should always have a backup plan. A plan that will get you restored if something goes wrong with the systems you’re managing. When it comes to WordPress and MySQL databases, that same strategy should apply. This brief tutorial is going to show you how to easily back up your WordPress MySQL databases using cPanel as well as from a Linux command terminal.

Backing up MySQL databases via cPanel

Since many of WordPress blogs and websites are being hosted with the help of cPanel, let’s start with that. cPanel is a website hosting tool that’s primarily geared toward new users as well as students. It makes managing websites easy, so easy you don’t need to understand Linux or programming. cPanel uses phpMyAdmin to manage MySQL databases.  More on phpMyAdmin can be found at the link below: To backup MySQL databases via cPanel, go to the Databases section in cPanel and select phpMyAdmin as shown below. Next, select the WordPress database from the left menu and click the Export button as shown in the image below. On the next page, choose the Quick export method and click Go as shown in the image below. Doing that will prompt you to select the location and save the export. Choose a location on your local computer and save the database file. That’s how you back up MySQL databases via cPanel.

Backing up MySQL databases via the command line

Another way one can back up MySQL databases is via the Linux terminal. This is a more advanced way to back up MySQL. With MySQL installed and access to your terminal server, run the commands below to log on to the database. When prompted, type the root password for the database to connect. To see the current list of databases, run the command statement below: That will show all the databases configured on the system. Record the database name you wish to backup and type exit. On the terminal screen, run the commands below to backup the database Running that will download a copy of the database into the directory you’re working from. Save a copy to a safe location and you’re done. There might be other ways to back up MySQL databases, but these are the two easiest ways to do it. Thanks for reading and please come back soon.