Mankind is a peculiar animal who never seems to learn from his mistakes. Even though I’m sure most of you have lost valuable files or photos during the years I’m sure just a fraction of you backup your computer.
The simply truth to why we don’t backup up our beloved things is that it takes time. Who want to spend one hour every week making a backup of their files when you haven’t lost something for several years?
Because of this it’s important to set up a scheduled backup. For the files on your computer you can use a network hard drive and a software to transfer all of the files once a week, but how can you backup your WordPress blog?
How to Automatically Backup WordPress
When scheduling a backup of your WordPress blog you need to backup two things. Your database with all your posts and the files with all your images.
Because of this we need to use two different tools. One plugin for WordPress named WP-DB Backup and a software for Windows named SyncBack.
Follow these instructions step by step to make a scheduled backup.
- Download and activate WP-DB Backup from WordPress.
- Go to tools –> Backup. Here you’ll see a lot of different checkboxes, but scroll down to the bottom where you have Scheduled Backup.
- Fill in how often you want to make a scheduled backup and which tables to include. Personally I prefer to make one every week or daily, but it’s up to how you depending on how often you make a new post.
- Enter your mail and press Schedule backup.
I’ve also created an account on Google Mail to archive every backup i create.
Now we have a scheduled backup for all of your posts and comments, but what about your images and themes? Since WordPress doesn’t support this service we need to use a third part software and for Windows I’ve found that SyncBack works great. Any recommendations for Mac?
Before doing this I recommend you to take a manual backup of your files since a small mistake could cause you to lose all of your files.
- Download and install SyncBack.
- Create a new profile and choose backup as type.
- Name it whatever you want.
- Press Expert and go to the FTP tab.
- Check The destination is on a FTP server.
- Enter your FTP details and press Test FTP Settings.
- Click on the folder next to Destination in your upper right hand corner.
- Click Yes and browse to the directory you want to backup, then hit OK.
- Now you do the same thing with Source and choose where to backup.
- Go to the Advanced tab.
- Under What to do if the same file had been changed in the source & destination? you select Destination overwrites source always (restore).
- Under What to do if a file is in the source but not in the destination? you select Delete file from source.
- Under What to do if a file is in the destination but not in the source? you select Copy file to source.
- Go to the Background tab.
- Select how often you want a backup of your files.
As you can see above there are some settings you need to change when using SyncBack. This is because the software are built to work the other way around and send your backup to a FTP instead of getting it from one.
Remember to do a manual backup of your files with your regular FTP software before setting this up since it could cause you to lose all of your files if you use the wrong settings.
How to Restore WordPress
For some reason you’ve lost all of your posts or files and now need to restore WordPress. Thanks to our previous backup this is piece a cake.
To restore your database you need to use phpMyAdmin, a software used to manipulate a database through a web interface. If your host doesn’t have this i highly recommend you to change WordPress hosting.
- Upload your files with a FTP software.
- Login to phpMyAdmin.
- Click Databases and select the database you will be importing to.
- Click the Import tab in the top of your screen.
- Click on the Browse button and select your latest backup from the mail.
- Click the Go button.
- Go have some fun while waiting.
Depending on how many posts, comments and categories you have this may take a while but the whole process should help itself.
If you receive an error, feel free to contact me for advice.