Backups are frequently overlooked but absolutely essential. Relying on your webhost to keep backups of your data is bound to backfire some day. Companies go bankrupt, data centres burn down, and hackers can be very destructive. In fact, one recent web hosting company in Australia lost all of their customers data – including backups – after hackers broke in! I hope you remember how Anshul lost his WordPress data and regained it later.
Many of you are likely using WordPress, in which case you have the option of using the WordPress database backup plugin, located here. However, this does not backup plugin data and thus, is not a true image of your website setup. Furthermore, for other CMS platforms, this is not really a solution. Thankfully, the procedure to backup your database through phpMyAdmin is relatively straightforward. The vast majority of web hosts come with phpMyAdmin; if yours doesn’t then the following steps aren’t going to be of much use to you.
Backup Your WordPress Database (MySQL) Using phpMyAdmin
Step 1. Login to your web host’s control panel and click on the link to phpMyAdmin. Depending on your control panel software it might simply be an icon, or might be in a menu labeled something like “Hosting Features”. You may be prompted for a username and password for phpMyAdmin, which will be the same as those you chose when you setup your WordPress installation (check wp-config.php in your installation folder, the username and password will be in there under “DB_USER” and “DB_PASSWORD”)
(An alternative method to Step 1 is to visit www.yourdomain.com/phpmyadmin and login directly to phpMyAdmin)
Step 2. There should now be a phpMyAdmin icon in the top left. Click on the home icon on the left, then select your WordPress database from the list. If you are unsure what your database is called, you can again check wp-config in your installation folder – it is under the entry for “DB_NAME”.
Step 3. Your database tables will show up in a column on the left, with the database title at the top, as per the screenshot. Click on the Export tab.
Step 4. Ensure that all items in the export box are selected (click “Select All”). Down the bottom, tick “save as file”. I find that using compression tends to be problematic, so leave compression set to none. Then click Go in the bottom right. The browser will appear to do nothing for a few seconds then pop up a box asking you if you wish to save a file. Save it. Depending on the size of your database the download could take a few seconds to a few minutes. Now exhale, you’re done!