This is a short and simple post, consider it a best practices for blogging and website management in general. Back up all of your article and your uploads very frequently. The best looking design in the world doesn’t mean anything if your carefully tweaked theme is erased by a errant keystroke. This article will focus on WordPress installs because its what I am most familiar with. For Drupal, Joomla, or hosted blogs your mileage will vary but the sentiment remains the same.
The entirety of the Caffination Podcast as you see it right now has disappeared twice so far, both my fault. Just a tip when your blog asks you “are you sure?” Make sure that you are. But because i had backups running it was only down for a total of 30 minutes between the two mistakes. I have never had a catastrophic hardware failure on the server level, I have never lost all of the files on the server, failed to pay a bill and had my account closed or anything like that but you get the drift.
First off anything under the wp-content folder should be backed up every time you add content to it. I had an exact copy of the wp-content folder for the caffination podcast on my server at home, when i upgrade plug ins I put the files in the folder at home as well. When I upload episodes they go to the backup first. All of the rest of your files can be recovered some more easily than others.
Here is my backup list for wordpress. All of these files are referenced from the root where wordpress is installed
- /sounder/… (Where i keep promos and other short term files)
- /desi/… (Where I keep shared design files)
Make your own list of files you can’t live without and make sure you have a local or second location copy of all of them. if you need to grab all these files you can fire up your FTP client and download to your hearts content, the first time will take a while after that you will only need to make changes. To automate this process from a Linux machine i love this command
wget -rl8 --user=user--password='myPassword' www.yoursite.com/wp-content/
- Lets break this down. wget is the command that enables you to grab files from a remote location
- the -r allows this to be recusive, so it will drill down into the directories below where you specify
- the default level for wget is 5 directories down so wp-content/uploads/fun/things/to/download/awesomestuff would not be touched, the number after the l specifies how many levels down you need to dig to get all your content
- –user= put your username for the server / ftp here
- –password= I’m not going to dignify this with a response
- lastly the address were you have ftp access to the server
There are plenty of other methods you can use to grab everything and I’m hoping other people chime in with better scripts or even freeware applications to do this for you.
Most blog softwares runn off of a database, the dirty little secret for wordpress is that its not so much the files on your server, except for the episodes of a podcast, that are valueable, but rather the data in the database which contains every setting you have clicked, every post, every comment.
EVERYTHING MUST GO!
There is an awesome plugin for WordPress called WP Database backup. This is a simple to use plugin which back your data up and either saves it to the server, or the machine you are working on right now, or emails it to you. Can’t go wrong with that now can you? there are other plugins that are there, but this is the one that has saved my pork loin twice now.
The only problem you might have is when you’ve had a blog for a long time it might not always be so easy to import the dacked up database after you are ready to recover. but we can cover that another time.