WordPress is the leading CMS for blogs and is used by most self-hosted blogs on the Internet these days. Today in this article, am going to talk about a few ways to back up your wordpress database so that if something went bad, you will have sufficient backup files to restore your blog to a previous safe and secure state.
Export from wordpress panel – this is the easiest way to backup a wordpress blog. All you have to do is, login to your wordpress admin panel and navigate to the tools option. In the tools you will find a tab that says export. Click on that and download an xml backup file of your wordpress containing your posts, pages, comments, custom fields, categories, and tags. This is one of the easiest ways to backup wordpress database, and when you need to use the xml backup, just use the import option and wordpress will slowly import everything from the xml backup file.
Next option is to backup using a wordpress plugin – wordpress has many utility plugins that provides a wide array of features. One such plugin is, “WP-DBManager”. This is not only for database backups but also have a lot of features, which includes database repair and optimize which has helped me a lot in the past.
- Back up from the control panel – Your hosting provider gives you a control panel, most likely it will be cpanel, however my host is godaddy and it provides me with a custom panel. If you are a godaddy user then login to your godaddy account. Select the hosting account you want to backup for and then click on – “manage account” next to it. After that click on database and select mysql. From the mysql page click on edit/view details button under the “action” button. That will slide down some options, which will include backup database and restore database.
- Backup from PhpMyAdmin – Its not that much technical as it sounds, rather it’s a quick way to access and manage database. For backing up a database from phpmyadmin, just click on the “open manager” button on the same page of point number 3. Once you click on the open manager button, it will take you to phpmyadmin page, there you will be first asked for database login details. Once you login, you will enter phpmyadmin. There, simply select the database and click on the export button. Select sql file as backup file and you are done. In the same way for restoring a backup, use the import button.
Note: You will find database and phpmyadmin options in your cpanel as well.
Proper and timely backups will surely make blogging life easy. Remember it takes just a few minutes to make backups and the same few minutes to restore a backup, but if something goes wrong without a backup then it can take ages of manual labor to get your blog to a state, where it was, when it was up and running.