Backing up and transferring your content
Making regular backups of all your hard work can't be recommend enough. If your server is ever compromised by hackers, or your web host fails you in some way, you could potentially lose years of blog posts. If the unthinkable happens and your site is completely destroyed, getting it back up and running could be as simple as reinstalling WordPress and uploading a file - your content could go live again in just a few minutes.
WordPress can export your content as an XML file which can later be used to restore or transfer your content to another WordPress installation.
To export this XML file, in the Dashboard controls, click "Tools" then "Export".
You'll see you have more options than just backing up everything. You can choose to back up the blogs of just one particular author or of all authors.
By default absolutely everything is selected, probably exactly what you need. Click "Download Export File"
Save the file to your computer.
Let's pretend you just lost your entire blog! It's a catastrophe! Some malicious person guessed your simplistic password that you repeatedly use on every single website even though you know you shouldn't and deleted all your content. Luckily, although you're lax on the password side of things, you do make backups regularly and you have your XML file on hand. You now need to restore you blog from this file. In the Dashboard, also under "Tools" click "Import".
You'll see we have a number of options to import content from a number of different services, but right now we are interested only in WordPress, which is the last option.
If you're using pre-WordPress 3.0, you'll see you can browse for your XML file and can, if you wanted to, and if your content really had been deleted, click "Upload file and import". If you are using 3.0+ you'll now need to click Install to download the importer plugin before being able to do the same.
Obviously you don't need to do this right now, it is sufficient to know you can do it, and as we've seen, it is also possible to import blog posts from other services.
If you were to follow this through, the final thing you'd be asked is who to assign the posts to, as the XML file you upload may contain authors that don't exist on this installation.
Things you really should consider:
- This means of backup is not perfect. If you are serious about backing up your content, if either your business or your heart and soul depend on your content, use the more comprehensive backup procedures provided by your web hosting company. These facilities will allow you to make comprehensive backups of the files on your web server and of the tables in your database.
- Back up your content regularly, this can't be stressed enough.