In my previous article, I shared the horror of data loss with you. However, my willingness to backup my data has saved me. I hope that none of you have to experience that, but if you do, this will have been a worthy read. This article is dedicated to helping you keep your blog safe. The stories of data loss are growing in numbers. If things go wrong, you will be prepared, and you will be able to brag that you saved your data from extinction.
I will be discussing manual and automated solutions for accomplishing the task of backing up your blog. A manual solution has a much higher chance of being a perfect one-to-one copy if done correctly, and as a result, it should be performed regardless of whether or not you have an automated solution in place. The automated solutions are much easier and require little to no maintenance, but are not guaranteed to work correctly.
Manual Backup — The Safest Way (If Done Correctly)
There are two critical parts of most blogs: on the one hand there are the site files and folders that usually hold information about your site’s plugins, styles, and functionality, but on the other hand you have the database which stores most, if not all, of the user generated data. Both are crucial, but the database — in most cases — will be the most valuable part of your site that needs to be backed up.
Chances are great — unless you are self hosting your blog — that you will have access to FTP. The purpose of having an FTP connection is to transfer files between your site through the internet. As you can already imagine, it will be used for downloading your files from the web server for backup purposes. Some of you might have never used an FTP application, but it is worth understanding how they work.
Here are some free FTP applications for the Microsoft Windows operating system:
For the Mac operating system:
It is as simple as drag and drop with the aforementioned programs. You might have to ask your web host for the login credentials, but they will be glad to help you out in most cases. Most hosts will also be glad to walk you through properly operating your FTP application as well.
Once you have accessed your site via FTP, you want to locate where you installed WordPress. This might be the root of your site, or it might be in a directory such as /blog. You should notice see various files that begin with “wp-” as the prefix. Once you locate these files, you know you are ready to copy all these files and directories to your local hard drive.
Once the download has been completed, you have successfully done half the work to completely backing up your blog. Time now to move forward with the more difficult task of obtaining your data within the database.
All respectable hosts offer phpMyAdmin as a method to accessing and managing databases. As said before, almost every content management system stores user content within a database. Unfortunately, backing up the most important data of most websites is not the easiest task for someone new to this kind of stuff.
Most shared hosts provide you with a control panel that will give you direct access to phpMyAdmin. In cPanel, a popular control panel used by shared hosting subscribers, you can find phpMyAdmin under the database management sections of the interface. Other control panels will likely have it listed in a similar location. If not, your host should provide you with a URL in an email that will give you a location to access phpMyAdmin directly after you have signed up. If your shared hosting provider doesn’t provide this or a suitable alternative, it is really time to consider switching.
Once you find phpMyAdmin, you will notice several databases listed on the left sidebar. Most default and automated installs of WordPress have a database named similar to “wrdp_1” or “wp_1.” Click on the drop-down menu and locate your WordPress database. If you have actually created the database required to install WordPress, then click on the name of your created database. If you can’t locate it, send me a message and I’ll assist you in any way I can.
From there, it is just a few steps until your finished:
- Click on the Export tab
- IMPORTANT–click the “Add DROP TABLE / DROP VIEW” check box under the “Structure” section
- IMPORTANT–Ensure that the “Complete inserts” check box is enabled.
- IMPORTANT–Check the “Save as file” box located near the bottom of the page.
- Select “None” for compression if your database is not that large. If it is, select a compression format like “zipped.”
- Select the location to save your file.
- Store it in a proper and safe location
I must insist that you read the official WordPress guide to backing up your data. It goes into everything I just listed with extreme detail. My instructions will get you to the same point.
Make This A Habit
I would strongly recommend you make it a habit to manually backup your system at least once a month. The more often, the better. The reasoning behind this is that automated solutions can fail. From personal experience, they have failed. You never truly know until it is time to restore the data. That is not to down the available automated systems, but it is also better to be safe than sorry.
Automated Backup — The Easier, Riskier Method
Some of us are busy, some of us have multiple blogs to deal with, and some of us are just plain lazy — as a result, we like to have the computer do the work for us. I can respect most of the reasons for wanting an automated system in place, but you must accept the fact that there are risks to doing this. While it might be the easy way, there is no guarantee that everything will go as planned once you hit the restore button. Keep that in mind.
There are not that many reliable plugins for the job, but these two will help keep everything in working order. Unfortunately, I have seen many problems reported with the use of both plugins. I will leave the decision up to you on how heavy you want to rely on them, but even the WordPress Database Backup plugin failed for me.
The WordPress Database Backup plugin seems to be a standard when being discussed on the internet. It is a highly recommended plugin. BackUpWordPress, however, is a plugin that I have only recently heard of, and I have seen many issues reported with it. Regardless, when using an automated system, you should test to make sure that you can properly restore your blog.
Scripts are files that automatically execute commands within a web server. Utilizing the cron service is an excellent example of this. It is very useful service for automating what would be repetitive tasks. Although, before using any of these scripts, I strongly suggest that you understand exactly what the script is doing. I also must warn you that there is no guarantee that the script will run. Also, please note that these scripts will not download your site’s files — only the database files (your site‘s content) will be backed up.
Scripts that will help you automate the backup of your WordPress MySQL database:
Again, you should take the time to investigate each script and understand what it does. You should also regularly check that the tasks are being performed.
Keeping Your Backups Organized
You have hopefully saved your WordPress database and files. Now you should properly store them in an organized manner. I have a folder called “Backups” on my drive. Then I have the following folders in a descending hierarchal structure: Backups, 2008 (year), 02 (month), 25 (day), Tech In Demand (site/blog). The site files and database file will be placed within that folder structure. This assists with easily locating previous backups as they will be organized properly by alphanumeric order and separated by site/blog.
If you have storage space online, I would suggest storing the files there as well. Also, a service like Mozy — which is free for up to 2 GB of storage — is great for the purpose of backing up your blog. I would also consider storing your backups on a portable USB hard drive as well.
In the end, the more redundant you are with blog‘s data, the safer your data will be; plain and simple. If you have any additional tips for backing up a blog, please feel free to add them in the comments section. Even I am willing to learn of new ways to keep my data safe.
Hopefully, one day there will be an incredibly reliable automated solution, but for now, exercise caution.