WordPress Plugin: WordPress Backup

This post is part of my WordPress Essentials Toolkit — a collection of the most important basic steps to maintaining a WordPress site. Get a free copy of this helpful 28-page PDF by subscribing to my Weekly Web Tips!

I’ve previously written about the WP-DB Backup plugin, which automatically backs up your WordPress database. But even with your database backed up, if something were to go wrong with your site, you could still lose important files — such as your theme, plugins, and images (also audio files, PDFs, and other documents you may have uploaded).

Fortunately, there’s another handy tool that can automatically create backups of these files: the WordPress Backup plugin. Like WP-DB Backup, once it’s set up, it runs automatically — but there are a few important and non-obvious tweaks you need to make to configure it correctly.

Step 1. Install and activate the plugin in the usual manner

If you need a refresher on how to do this, check out my post with step-by-step instructions for installing a WordPress plugin.

Once WordPress Backup is activated, you can get to the settings by clicking the link in the plugin description (shown in Figure 1), or by navigating to Settings –> WordPress Backup (shown in Figure 2).

Figure 1: The WordPress Backup entry on the Plugins page contains a handy link to the settings.

Figure 2: Navigating to Settings --> WordPress Backup

Step 2. Set the frequency and location of your backups

The first time you visit the settings page, you’ll see that the plugin has already created three backups, for your uploads (that’s everything in your Media Library), theme, and plugins (even though on this page it’s misspelled “pluigins”).

If you click any of the linked backup names, you’ll begin the process of downloading a .zip file. It’s a very good idea to keep copies of these .zip files on your home computer in case something happens to your web host’s server.

However, make sure you complete the next couple of steps to make sure your .zip files contain the right information!

Figure 3: Your first backups are created immediately, but there are still a couple of settings to change.

Here’s where you set your backup-creation frequency. Your choices are hourly, daily, or weekly.

You can also tell the plugin to email you copies of the .zip files each time a new backup is created. Be careful if you choose to do this, because even though .zip files are compressed, they are still typically very large — especially if you have a large Media Library or use many plugins. Huge attachments can clog up your inbox or prevent delivery of the email at all.

If you leave the Email field blank, the plugin will still work and backups will still be created regularly (according to the hourly, daily, or weekly setting), they just won’t be emailed to you. They’ll be stored on your server in the Backup Directory (shown below in Figure 5), and you can manually download them whenever you wish.

Step 3. Check for correct directory names

Now scroll down to the bottom half of the settings page, where you’ll see four fields that are pre-filled with directory names, as shown in Figure 4.

Figure 4: Look carefully at the directories being backed up!

WordPress Backup is supposed to automatically find your plugins directory, your current theme directory, and your uploads directory — but it doesn’t always do it right.

The correct settings should all start with yourdomain.com/wp-content/, followed by three specific directory names:

/plugins (for plugins)

/themes/themename (where themename is the directory for the theme you’re actually using)

/uploads (for the contents of your media library)

However, as you can see in Figure 4, the Uploads directory is not correctly identified! You may need to type “wp-content/uploads” after your domain name.

Then remember to click the “Update WordPress Backup Options” button to save your edits.

Step 4. Advanced option: Add an .htaccess file via FTP

This plugin automatically creates a backup directory called “bte-wb” (the “bte” part stands for Blog Traffic Exchange, the plugin’s author — but I never fail to think of Better Than Ezra when I see the initials…but I digress).

Figure 5: Backup Directory settings

Then it asks you, in red warning letters as shown in Figure 5, to “please add an .htaccess file to the backup folder.” There’s a link to some instructions on the official WordPress Backup plugin page, which I summarize below.

The plugin will still work even if you don’t add an .htaccess file. The purpose of adding this file is to prevent your backups from being publicly accessible. Feel free to tackle this step as a separate project, once you’re sure the plugin is working correctly and you have copies of the .zip files on your home computer.

Here’s what you need to do to add an .htaccess file:

  1. Create a text file: On a Mac, open TextEdit. On a Windows PC, open Notepad.
  2. Paste the following text into the blank text file:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} .*bte-wb/.*
    RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]
    RewriteRule . - [R=403,L]
    Options All -Indexes
  3. Save the text file as dot.htaccess (if you saved it as .htaccess, it might become invisible to you since filenames beginning with a period are normally hidden)
  4. Upload this file to your bte-wb folder, inside wp-content, using FTP (I know, this point deserves a whole post of its own!)
  5. Rename the file .htaccess
  6. Back on the WordPress Backup settings page, test the download links to make sure they still work.
  7. Paste the full Backup URL into a new browser tab to make sure that it’s preventing outside access (if it works correctly, you’ll get a “403-Forbidden” error and you won’t be able to see any filenames).

Credits: I created this .htaccess file by combining this limit access to logged-in users code with another bit of code to prevent users from seeing the contents of the backup directory.

Step 5. Download regularly

After your settings have been updated and your .zip files are being correctly created, make sure you have copies of the .zip files on your home computer.

If you choose to have backups emailed to you, make sure the .zip file attachments arrive safely.

If you don’t want huge email attachments, remember to manually download the backups! I’d suggest a schedule like this:

  • Download your theme backup after you change, upgrade, or edit your theme (and check the WordPress Backup settings to make sure it’s backing up your new theme, if you switch themes)
  • Download your plugins backup after you add or upgrade plugins
  • Download your uploads backup every week or so (but take into account how often you are adding things to your media library — if you rarely use images or sound clips, this could be less frequent, but if you add new images every day, you might want to do it twice a week, for instance)

Got a backup question? Leave me a comment or call during my Thursday Office Happy Hour!

And if you’d like me to handle your backing-up and upgrading for you, get in on my Peace of Mind Program: For $89, I’ll set up backups and make sure you’re fully backed-up and upgraded through March 2011.

How to upgrade WordPress (now with video tutorial!)

This post is part of my WordPress Essentials Toolkit — a collection of the most important basic steps to maintaining a WordPress site. Get a free copy of this helpful 28-page PDF by subscribing to my Weekly Web Tips!

WordPress announced today that an upgrade is available — version 3.0.2 has just been released.

I recommend staying up-to-date with WordPress upgrades as they become available, so you always have the latest security fixes (this release is described as being a security update — here’s the official upgrade announcement from WordPress.org.).

To show you how easy the one-click (really two-click) WordPress upgrade process is, I recorded a video of my screen as I updated my own site today. Yes, my real live business site! The video is four minutes long, but most of that is me talking about why it’s important to upgrade, and why you should back up your WordPress database and files before upgrading. The actual upgrade process takes about 10 seconds toward the end of the video.

If you can’t see the video in your RSS reader or email application, head over to the original blog post to see it.

And if you don’t like watching videos (true confession: I almost never watch online videos, not even from my bestest friends — so if this is you, I totally get it!), I wrote a post several verions of WordPress ago that has text instructions and screenshots illustrating how to upgrade WordPress. Other than the version numbers, the process is exactly the same.

This video shows my whole screen, and it’s kinda small — click the button in the lower left corner of the player, the one with four little arrows pointing toward the four corners, to watch it at full-screen size (and then press the ESC key to return from full-screen to tiny-player mode).

There, wasn’t that easy?

Now, if you need help with backing up before you perform your own upgrade, you can read about the WP-DB Backup plugin. That plugin backs up your database but not your files (your media library, theme, and plugins). There’s another plugin called WordPress Backup that takes care of that for you. The two plugins together cover all the crucial backup functions you need.

And if you want to hand off all this backing-up-and-upgrading stuff to someone else, I can do it for you.

I’m running a small pilot version of a peace-of-mind service (it’s so new I don’t even have a Buy Now button, let alone a sales page — email me if you want in!).

Here’s how it works: You pay $89 by the end of December 2010 and get WordPress upgrades, monthly plugin upgrades, and weekly backups (both database and file backups) through the end of March 2011. Anyone for whom I’ve installed WordPress also gets theme upgrades (because you’re all using my favorite theme, Atahualpa!).

Got a question? Leave a comment, send me an email, or call me during Open Office Hour!

What plugins should you be using?

I’ve heard this question a few times recently. Although I do have a list of plugins that I recommend for most new WordPress sites (more on that in the next post), I’d like to go back to first principles and reframe the question.

Before asking “what plugins do I need?” first ask “What do I want my site to do?”

The best plugins for an online art store are different from the best plugins for a breaking-news blog, because the sites are designed for totally different goals.

Even two sites that seem outwardly similar — two online art stores, say — could have different plugin needs. One artist might be a social-butterfly blogger building a tribe of individual fans, and the other might be aimed solely at selling commissioned pieces to corporate collectors.

Different goals, different needs, different plugins.

Also, plugins are software. They’re pieces of code that “plug in” to the WordPress software that’s already running your site. As you add more pieces of software, you increase the likelihood that your site will load more slowly and be subject to mysterious and terrible things like JavaScript conflicts.

When it comes to keeping a WordPress site running smoothly, I like to invoke Occam’s Razor: Entities must not be multiplied beyond necessity.

Or, in non-philosophy speak: Use the right tools for the job…and as few of them as possible.

Here are a couple of specific steps you can take to get rid of unnecessary plugin clutter and conflicts:

  • Deactivate plugins you’re not actually using. Ask a web person (hello!) if you’re not sure what a specific plugin is actually doing for your site.
  • Delete inactive plugins. Don’t keep them around “just in case” you might need them someday. It’s better to just reinstall them if the need arises.
  • Upgrade plugins when a new version is available (you can see right on the upgrade screen whether new versions are compatible with the version of WordPress you’re using — which is also the latest, right?).

I’ll be sharing some ideas on what exactly “the right tools for the job” means, as well as some tips for finding and evaluating plugins for use on your site, in coming posts.

Have a plugin question? Ask in the comments, or give me a call during Open Office Hour.

Updated version of “How to install a WordPress plugin”

I just updated my original How to install a wordpress plugin post with a couple of new screenshots for newer versions of WordPress.

Also, it’s now Part 1 of a series on WordPress plugins. I’m playing around with a blog-post-series plugin (my, we’re getting meta today — series on plugins, plugins for series…) to organize related posts, and it’s equal parts fun and frustrating. Such is the nature of tweaking.

Keep plugging away…and leave me a comment if you have a plugin question!