The most important thing you should do to protect your WordPress blog is to have a backup strategy. Whether it is automated or you have the discipline to do it manually, backing up your WordPress blog should be done on a regular basis.
Table of Contents
Regular Backups of WordPress Site:
The most important thing to backup on a regular basis is the database, that is what holds the actual content or posts. At least once a week I get contacted by someone who lost their WordPress blog only to find the database is gone, and they have no backup to restore it. If this happens to you and you have no backup, you might get lucky and ask your web hosting provider, if they have a backup that they can restore for you. I did a recent post how to manually Backup The WordPress Database. In this post, I will show you how to use a plugin to schedule an automated database backup.
The plugin is called WP-DBManager, and it has a few more options than previous database plugins I have used. Once installed and activated it adds it’s own Database module on the left side (if using WordPress version 2.7+). Expanding the Database module will give you various sub menus. You can view the settings and the tables, manually backup the database, repair, restore and drop tables from the database. I will warn you that messing with some of the Empty/Drop Tables settings can be dangerous if you don’t know what you are doing! The menu that we are most concerned about for this post is the DB Options menu. That is where you can configure the plugin for automatic scheduling. Once in the options menu scroll down and select how often you want the backup to run and the email address you want it sent to. I suggest choosing the Gzip option to keep the size of the file as small as possible. Under that is another option to schedule the database to be optimized on a regular as well.
Files Backup (WP-Content Folder):
The other thing to have a backup of are the plugins, uploads folder and the themes. The plugins don’t need to be backed up often if at all. That is more of a convenience, so you don’t need to remember what ones you were using and download them all again. The themes are a little more critical only if you have a custom theme or have edited any of the files in your current theme. The uploads folder is slightly more critical if you upload images into posts on a regular basis. The uploads folder is where all the image files are stored by default unless you changed that option. I suggest just backing up the entire wp-content folder where all of these files are stored. To do that you will need an FTP client like FileZilla and connect to your site with it. Using FileZilla, browse to the WordPress files, right click the wp-content folder on the right side and choose download into the backup folder on your computer.
Once you have the whole wp-content folder backed up, then all you need to backup on a regular basis is the uploads folder. The uploads folder is in the wp-content folder. Browse to it and then right-click it to save it to your computer.
Now you can keep drilling further down into the uploads folder and the only backup just the current year.
Or you can even drill further down into the year and just choose to backup a month.
Whatever backup strategy you choose is up to you, but not having one is a very dangerous approach.