What is the recommended backup strategy for a wordpress blog. Is there anything smarter than grabbing snapshots of the full directory? Does that give me the most likelihood of being able to recover later?
Nope. That gives you your WordPress app files (that you can download again from WP at any time), your plugins and your themes. Certainly helpful, but you won't have any of your data -- Posts, Pages, configuration, etc.
Learn more at http://codex.wordpress.org/WordPress_Backups
You'll probably want to look for a backup plugin that will help automate the backup process -- many will even email you the actual backups for storage. Look through this list: http://wordpress.org/extend/plugins/search.php?q=backup
Hope that helps.
HERE are some tips.
Just backing up the files isn't enough, and not strictly necessary, since you can always reload WP, themes, and plugins if necessary.
More important is your database, which holds all your content, settings, authors, etc. There are a number of plugins you can use to backup your database; a popular one is WP-DB-Backup. Once installed, it's simple to use. You can do a backup manually, and download the backup immediately, or you can configure the plugin to email you the backups at a regular basis. If you're worried about up-to-date backups, this is a good way to do it.
I've borked my blog server a few times already, so I have tested the backup strategy I had a few times. https://trajano.net/2015/04/backup-wordpress-blog-to-github/
I utilized Github when I originally started, but I have switched to Visual Studio Online because it allows for for private repositories but the concept is still the same.
- Make a branch in some remote git repository in my example I used
- Create a
my.cnfthat has your credentials
- Create a cron job that runs the following script
#!/bin/sh mysqldump --defaults-extra-file=/home/wordpress/.my.cnf \ --add-drop-database --skip-dump-date --skip-extended-insert \ --database wordpress > /var/www/html/db/wordpress.db.sql cd /home/wordpress/wpgit if [ -n "$(git status --porcelain | grep -v wordpress.db.sql | grep -v trajano-wordpress-theme)" ] || [ "$(git diff -- db/wordpress.db.sql | grep wp_posts | wc -l)" -ne "0" ]; then git add -A > /dev/null git commit -q -m "Backup wordpress database" git push -q origin backup fi
Fleshed out details are still in my blog post https://trajano.net/2015/04/backup-wordpress-blog-to-github/
If you want to migrate a wordpress site, you can use
Duplicator – WordPress Migration Plugin.
Migration includes backing up. Migration also include moving a whole site to another url. I tried 2 or 3 other plugins, Duplicator – WordPress Migration Plugin suited me the best. But I was looking for migration plug-in not backup plugin in case you are curious.