Dev & Design
How to Backup Your WordPress Website – A Beginners Guide
If you have installed the WordPress.Org version of WordPress in your website, i.e, Self hosted WordPress, you might need to migrate your server and thus need to backup your WordPress website. These instructions will walk you throughout the process with the most simple solution. So here we go,
Here’s how you will backup your blog (it’s very simple, really). Here’s what you need:
- Install the WordPress Database Backup plugin.
- Figure out from your hosting provider, how to access your account through SSH, and have your username and password ready.
- Download putty.
In addition, you should be a little comfortable with command line access to your server. Here is the process:
Step 1: Backup Your Database
With the plugin installed, this is how easy it can be. Just follow these steps:
- Go to your WordPress admin panel, and find Backup under Tools in your admin panel. This lets you access the plugin options.
- Select the tables that you want to backup. The plugin automatically selects the core tables and lets you choose any plugin tables that you want to backup.
- Under backup options select “Download to your computer”, and click “Backup Now”. Depending on your DB size and the number of plugins you have, this process may take a while, but the plugin shows you a nice progress bar.
- Download the generated file and save in a safe location.
Step 2: Backup Your File System
The next thing to do is to backup your files. Normally, you may only want to backup your uploads and themes directory, but I prefer to simply backup the entire blog. Its only an extra few MBs, and this way you can simply restore your blog in one shot, if needed.
In order to make this part easy (compared to using FTP to get to your files), I recommend the use of SSH. Fire up putty (or any other tool or console to get SSH access on your server).
Note that different hosting providers have different rules for allowing SSH access. I had to have mine enabled by sending a photo ID proof to the support. I use BlueHost as my provider.
Once you have used SSH to login to your account, you should change your directory to one level above where your blog is situated. This is usually something like public_html, or something similar.
Once you are at that level, issue the following command:
tar -cvzpf backup.tgz public_html
Of course replace public_html by the name of your folder. What this command essentially does is that it takes the entire folder, and packages it in a tar file, and then compresses it using gzip into one compressed version of your entire file system for your blog.
Now simply download this file over, and save it where you saved the database backup. And that’s it, you are done.
Once you get the hang of it, it’s a very quick and painless process. See how you go and don’t forget to give us some feedback! Good luck.