Chapter 34. Backing Up Your Site

There's nothing more devastating in the world of computing than not having a backup of your data when something goes wrong, and the same is true on the Web. Hard drives die on web servers and even the most sophisticated server backup systems are vulnerable to human error or acts of nature.

Note

Your hosting company may offer automated backups, but double-check exactly what that means. If it's just your WordPress database, it's only half a backup. If all necessary WordPress files are getting backed up, be sure that you can get access to those backups and download them to your computer for additional safety.

A Backup Routine

Here's one simple routine for backing up your WordPress site. In the folder on your hard drive where you have anything relating to your site, create a new folder called My Site Back-ups. Then pick a time each month (more frequently if you're constantly adding new content) when you're going to stop for a moment and back up your site.

Each time you do the backup, create a new folder in My Site Back-ups using a dating system such as 20090617 (year-month-day). Usually you'll just want the most recent backup and this naming system makes it easy to find, but also if you need to restore the site from an earlier time.

Backing up WordPress is a two-step process, so in this 20090617 folder you're going to have two subfolders: one for the database backup and one for the web server files. The following sections look at how you get the material for ...

Get WordPress® 24-Hour Trainer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.