Backing Up

Tutorial Overview

Topics covered in this tutorial (click link to jump to topic):

1. Backing Up WordPress
2. Movie: Introduction to Backing up WordPress
3. FAQs

Backing Up WordPress

WordPress is not like an ordinary HTML/CSS web site. It is not just a collection of files that can be moved with an FTP client from server to server.

MySqlWordPress is comprised of:

  1. A database – MYSQL, to be precise
  2. A theme – which is just a collection of HTML/CSS and can be moved around using FTP
  3. A number of plugins – FTP again
  4. Text content – which can be backed up from the Tools > Export menu (and should be regularly)
  5. Media content – such as PDFs and Flash files. These too can be moved with FTP BUT they must to be put back in exactly the folder they came from, otherwise the database will loose contact with them

Using your Cpanel you can back up the lot in one foul swoop, save it into the root of you web site and then download it to your computer. That is the Rolls Royce solution and is required to move a WordPress site from server to server, but there are more user-friendly and faster means of backing up.

The first and most obvious is to take a text dump of the site from the Tools > Export menu. This is a thirty-second job and you would be well advised to do this little task frequently. The resulting XML file is pretty good – it will contain all posts and pages and post categories, but not links or any media (pictures files and pdfs).

You should keep a copy of your theme and media files off the server as well. This will protect you if you need to restore the site quickly on a new server. The theme and media files had to start from your computer in the first place, so keep them together in the same folder ready to be deployed in a disaster.

When Should I Back Up WordPress?

The short answer is whenever you have invested enough time in posts, pages or links that would be a pain to reproduce that work from scratch. So, probably quite frequently.

Another time is before a version upgrade of your WordPress core files and database. If you are using fantastico, it will create a back up of your database before the upgrade, but you can do this yourself anytime in Cpanel’s myPhp.

Regular Weekly Backups

There are short and long approaches to backing up your WordPress site. As much as possible Dynamic Web Solutions will make regular backups of your website. We will attempt to maintain a full copy of your theme (design) and your image files that you have uploaded over time.

Dynamic Web Solutions will be taking a weekly backup of your database and e-mailing it to a Gmail account. You can assist us in the backup of your site by taking a frequent XML text dump (as described above) of your website. It would also be helpful if you would maintain a duplicate copy of all the images that you have ever uploaded to your website.

FAQs

Can I move a WordPress site?

Yes, but it requires a good understanding of WordPress and control panels.

The text of pages and posts is easily exported then reimported into a clean install of WordPress. Hoverever this leaves the images and links behind and is only good for small, non ecommerce sites, where the images can easily be added back in.

If the site is large and complex you will have to download it completely, upload the files to the new location and restore the database from the SQL file (see below).

How do I back up WordPress?

The best way to do this is with the plugin. After much trial and error I recommend WordPress Database Backup by Matsko. It will email a compressed SQL file as regularly ask you like to an email address. There is a short XML back up of WordPress which is handy to take from time to time.

Other Resources

http://codex.wordpress.org/WordPress_Backups

http://codex.wordpress.org/Backing_Up_Your_Database

http://www.siteground.com/tutorials/php-mysql/mysql_export.htm

Print Friendly, PDF & Email