In order to completely backup WordPress, you’ve got to back up both the database, which contains all your posts and much of your configuration data, and your files, which include your themes, your plugins, and any hacks you’ve made to the WordPress code.
The more automated everything is, the more likely you are to back it up. I use the WordPress Database Backup plugin to backup my databases automatically every day. The backup is email to me.
I keep all my WordPress files in Subversion, and use a cron job to make sure that everything’s checked in.
Setting up Subversion for a new, existing WordPress installation:
Create a project in Subversion. I name the project with the blog’s URL: http://[subversion URL/eshulaughing.net.
Create the initial directory layout:
svn mkdir http://[subversion URL/eshulaughing.net/{trunk, branches, tags} -m "create initial directory layout"
Check out the trunk (which has nothing in it) to the existing directory:
cd [directory above eshulaughing.net]
svn co http://[subversion URL/eshulaughing.net/trunk eshulaughing.net
cd eshulaughing.net
svn add *
svn ci -m "initial import"
Now I’m sitting pretty in a working sandbox with everything checked in.
Add:
- how to check in changes every night
- how to back up the Subversion repository