Most blogging web apps, such as WordPress, use databases to store their data. This means that while the words you type appear in HTML format when someone accesses the site, the information itself is actually stored in a database such as MySQL.
Because of this reality, backing up the files from your HTML documents directory will not save all of the blog posts you spent countless hours writing. In order to save them and protect them, you need to backup your MySQL database. There are a couple of ways to accomplish this, some easier than others.
The common method employed by shared hosting users is to use some type of web frontend for MySQL, such as phpMyAdmin. Simply follow these instructions:
- Login using your MySQL username and password
- On the lefthand side, you should see a list of your databases. Click the one you want to backup
- Select the “export” tab at the top
- Choose the format from the dropdown menu (SQL is the default and is usually sufficient)
- Click “GO”
It should open up a save dialog in your web browser, allowing you to save it to your computer.
The above method is great if you want to manually backup your database and always save it to your own computer, but if you have a backup server and want the process to be automated, you will need to use another method. One of the tools that I have used for myself and for many of my clients is AutoMySQLBackup. It is free, open source, and fairly easy to use. Once it is configured, you setup a cron job for it and never have to worry about backing up manually again.