How to do a Thorough Backup of Your Wordpress Blog

January 12th, 2009 · Blogging with Wordpress

CathLawson, one of my favorite bloggers, recently experienced every blogger’s worst nightmare. Her host shut down her account and turned off her site. The site took 3 days to come back up.

I think this was shocking behavior on the host’s part, as there should have been ways that they could have let her easily access her files and database without keeping her blog live.

But the sad thing is that not all hosts will give you warning or let you get at your files (right away, anyway). So it’s important to have good backups. This way, if something happens to your blog, you’ll be able to restore without depending on hosts.

So, here’s how to run a thorough backup of your Wordpress installation:

Your Wordpress installation has two key components, the database and the files. The database stores all your settings and your content posts/comments/categories/blogroll/active plugins/active theme/widgets/etc. The files include the actual Wordpress schema that makes the site display…from the key Wordpress files to things like your plugin & theme files.

Backing Up Your Wordpress Database

This is the most critical part of your backup process. You can always re-add plugins that weren’t in your last file backup, make the same theme changes again (though always backup major theme overhauls) or use a different theme, and you don’t even have to worry about the core Wordpress components (they only change between upgrades, and you can always re-upgrade, or they’re available at Wordpress.org). As long as you have one file backup, you’ve got a starting point.

But if you don’t have a very recent backup of your database, you’ve lost every post you’ve written, every comment you’ve received, and every setting you’ve changed in the interim.

For backing up your Wordpress database, I recommend installing the Wordpress DB-Backup plugin. Once you’ve activate it, download a copy right away and then configure it for daily backups…unless you blog infrequently, in which case weekly might do as well. Err on the side of backing up. I save the last several backups, just to be safe.

Make sure that the backups you’re receiving have actual content. I’d suggest using a trial installation of WinRAR to unzip them. This should produce ordinary .sql files, which will look funny if you open them in plain Notepad (though Notepad++ displays them great!), but you can at least see that there’s content.

If you’d like an extra backup, periodically use the built-in Wordpress export feature (now found in Tools, post 2.7). It doesn’t have nearly as much detail as a database backup, but this .xml file will have your posts, comments, and a number of other important pieces of information. If you have trouble restoring from the database, you’ll still be able to restore from the .xml file.

Backing Up Your Wordpress Files

In theory, you could restore your Wordpress installation without a file backup, but why would you want to? Having the files right there makes the entire process much easier.

There are two ways to back up your files.

1) Consider using the Blog Traffic Exchange Wordpress Backup plugin. It backs up your themes, plugins, and uploads directories.

You can opt to have the plugin e-mail you backups periodically or backup from your site’s back-end. If the backups are too large, you may have to do it on your site because the .zip files can’t be sent through e-mail.

2) You can download all your site files (which means that you can just upload them again and import your database if you need to restore). I suggest using an FTP client such as Filezilla. Your host should have given you FTP login information.

When accessing your site via FTP, you can just download your site’s entire “root” directory, if that’s an option. In the image below, the “” contains ALL the site’s Wordpress files, theme files, plugin files, and uploads (whether to the “uploads” folder, another img folder, or anywhere else). Click for a larger view:

Or you can download ALL the directories and files inside your site’s root folder. That includes wp-admin, wp-content, wp-includes, as well as all the .php files and whatnot. If doing it this way, create a special folder on your computer to serve as a root directory of sorts.

Restoring from a Backup

That’s an article for another day. Until that day comes, there are other websites which have information about restoring Wordpress from backups. And if you have the files and database backup, any blog professional should be able to restore your Wordpress installation to your website or transfer it to another host’s website with little difficulty.

Related posts:

→ 6 CommentsTags: ··

| Print This Post Print This Post

Tutorial on Using Fantastico to Install Wordpress

November 14th, 2008 · Tutorial

My newest tutorial is on using Fantastico to install a Wordpress blog. I’ve used images from my LunarPages account, but one beauty of Fantastico is that it’s basically the same on any of the hosting systems which offer it.

Fantastico is so simple that it doesn’t even need a tutorial. But if you’ve never used it before and are nervous, you can see how it works, step-by-step.

Once you know what you’re doing, actually using Fantastico to install Wordpress is a matter of one or two minutes. So if you’ve nervous about setting up Wordpress with Fantastico, check out the tutorial!

Related posts:

→ No CommentsTags: ···

| Print This Post Print This Post

Easy Wordpress .htaccess 301 Redirect

October 17th, 2008 · Blogging with Wordpress, Tutorial

Recently, I moved a Wordpress blog from one domain to another. Most of the time, I work with blogging platform transfers or possibly moving the domain from one host to another.

In this case, I needed to direct traffic arriving at any page on the old domain to the same page on the new domain. I knew that I wanted to do a 301 redirect, but I hadn’t anticipated how simple the whole thing would be. I had anticipated a long list of redirect.

But it turns out that if you migrate a Wordpress blog from one domain to another domain, then all you need to do is make a small change to your .htaccess file at the old domain.

If there isn’t anything about the “RewriteEngine” in the .htaccess file, then add the following:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Replace www.newdomain.com with whatever your new domain is. Use “www” or not as you see fit.

However it’s quite likely that in the section following:

# BEGIN WordPress

you’ll find the first two lines:

Options +FollowSymLinks
RewriteEngine on

Directly after those, before any other rewrite commands, place:

RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

again replacing www.newdomain.com with the blog’s new domain.

This works on Linux servers which have Apache Mod-Rewrite enabled. That sounds very technical, but it’s also what’s offered by a large number of hosting companies. If you don’t know whether or not you have that, give the redirect a shot. You can always contact your hosting company if it doesn’t work and ask for their suggestions.

It takes about 20 seconds to do. And this works whether or not you still have Wordpress installed on the old domain. I deleted the entire Wordpress installation and just left the redirect up. Every link goes through to the new site.

A 301 redirect isn’t as good as a direct link, but in terms of traffic and even SEO it’s a best choice. Gives you time to find out who’s linking to your old site and ask them to change while making people follow those old links to the right place anyway.

Related posts:

→ No CommentsTags: ····

| Print This Post Print This Post