How-To: Automate Full Complete WordPress Backup

WordPress Dropbox backupWhy backup your WordPress blog yourself when your web host promised they will do it for you? Redundancy.

  • You wouldn’t know when your host will go out of business
  • When disaster will strike the data center
  • It’s not all that uncommon with stories about web host holding customer’s files ransom.

By setting up an automated complete backup of your WordPress blog, you can set up your blog in the exact same way on another host without begging anyone, anytime you want.

Automating the process will give you better sleep at night knowing you will always have access to the latest backup, without ever doing anything.

wp Time Machine is the best backup plugin for WordPress yet, for it will not only backup your database, but also all your files in wp-content, which includes your themes and uploaded images (unless you specifically uploaded them in another directory).

What’s better? Dropbox is supported, meaning you can store your backups in Dropbox, which in turn will sync the files onto your PC. Your data will now be available both in the cloud and locally.

How to setup?

1. First, install and activate the wp Time Machine plugin on your WordPress blog.

2. Go to Settings > wp Time Machine

3. Select Dropbox as your offsite service

wp Time Machine offsite service: Dropbox

4. Setup other settings based on your personal preference. Only enable “Time-stamped Subdirectories” if you have boatloads of storage on Dropbox.

5. Enter your Dropbox credentials and click on “Save my password“. (use a separate Dropbox account if you’re not comfortable storing your password in WordPress)
Enter Dropbox credentials

6. Click on the “Generate wp Time Machine archive” button.

Your backup will now be generated and will be uploaded to Dropbox shortly.

Automate the backup process

Now that you have setup your Dropbox account with wp Time Machine, you can automate the backup process by setting up a cron job on cPanel.

1. Login to cPanel

2. Go to Cron Jobs

3. Add a new cron job with the command:

curl "http://www.example.com/wp-content/plugins/wp-time-machine/cron.php?generate=1"

Select how frequent you want your blog to be backed up, depending how busy your blog is. Generally once a day would be good enough.

Add new cron job

You will now not lost a single article, comment or the tiniest modification to your theme files.

Are you using wp Time Machine as your WordPress blog backup solution? If no, what other plugin are you using?

P/s: If you haven’t heard of Dropbox, it’s an online storage service that will sync your files across all your devices. You will need a Dropbox account if you intend to use the above method to backup your blog. Sign up here.

#backup#dropbox#WordPress#WordPress plugin#wp Time Machine

Comments

  1. Michael Aulia @CravingTech.com - January 13, 2011 @ 5:51 pm

    This is something! I’ve been using Backup Technology (http://www.cravingtech.com/how-to-backup-a-wordpress-blog.html) but after seeing how this one can backup to DropBox, I might give this a look

    Having to add a cron job manually is a bit of a put off though as I might forget about it if I ever decide to uninstall the plug-in

    • Vincent - January 13, 2011 @ 11:54 pm

      Aha, I remember that post of yours. My current backup is at around 90MB, wouldn’t fit the free 50MB on Backup Technology.

      Before you got shocked, that’s because it’s backing up every single theme in wp-content. (I have 61 themes, thanks to DreamHost automatically including them by default, they’re all migrated to HostGator now).

      Will take some time to remove them soon. I like how you can encrypt your data though.

      Never thought of your concern. I guess it wouldn’t do much harm even if the cron job is hitting a 404 once a day if you forgot to remove it. Unless you set it at 15 minutes interval, that’s a different story. You will probably recall the cron job when your host complain about CPU usage.

      It would be perfect if it’s possible to schedule backups from the plugin itself.

      • Michael Aulia @CravingTech.com - January 14, 2011 @ 8:05 am

        61 themes?? Wow lol might be agood idea to remove most of them that you’ll never use perhaps 🙂

        I’ve been trying the plug-in but can’t seem to see any files on my DropBox or the FTP. Window status always says success and log file displayed:

        [2011-01-13 11:58:37 pm] — Initiate transfer to dropbox
        [2011-01-13 11:58:37 pm] — Instantiate new DropboxUploader()

        No files anywhere though.. guess I’ll try to search for a reason. Might be the curl requirement or other things. Thanks anyway!

        • Vincent - January 14, 2011 @ 11:50 am

          Mine looks like this:

          [2011-01-08 3:13:44 am] — Initiate transfer to dropbox
          [2011-01-08 3:13:44 am] — Instantiate new DropboxUploader()
          [2011-01-08 3:14:43 am] — Transfer has completed, to remote_path: /SheepTech/backup-2011-01-08
          [2011-01-08 3:14:43 am] — 73 seconds to execute entire process

          But we are on the same host, I guess we have the same specs?

  2. Vuong - January 13, 2011 @ 11:06 pm

    That is a good choice Vicent. So far I also a plugin that help me automatically back up the database.

    • Vincent - January 13, 2011 @ 11:57 pm

      Are you backing up contents in wp-content? I think your theme files are quite important too considering how much time you’ve spent customizing it. Also the plugins and images.

      • Vuong - January 14, 2011 @ 12:15 pm

        @Vincent, I have just installed the plugin.

        In my case, I seldom backup content folder but I always have a copy version of the theme. Now though I believe in Hostgator but solution is worth to try. I will suggest my friends too.

  3. Walter - January 14, 2011 @ 11:32 pm

    Are you a Chinese American? Vincent Chow? I guess you was born in America.

    • Vincent - January 15, 2011 @ 12:01 am

      I’m a Malaysian 🙂

      • Walter - January 19, 2011 @ 7:54 pm

        @Vincent, Chinese Malaysian? You speak very good English. I’m a Chinese. I have no idea which language Malaysian speak before.

        • Vincent - January 19, 2011 @ 8:54 pm

          The Malay language is our official language, but being a multi-racial country, most of us speak more than one language.

  4. Mrinmay Bhattacharjee - January 16, 2011 @ 3:54 pm

    This is a great solution for those who are on shared hosting server. Indeed Thanks for sharing 🙂

    In case, the files in the wp-content directory exceeds 2 GB limit, than Dropbox is of no use. We have to consider paid solution from Dropbox then

    AFAIK cPanel full backup compresses all files in tar.gz format. I am not sure, but I think that this plugin is going to backup each and every file in its RAW Format – This eventually increases the Backup Size

    Also those who are using VPS/Dedicated Servers, this plugin is of NO use to them, as they can backup their whole account using RAID

    Atleast for me, cPanel Full backup is the best solution as of Now. Though I’ll be trying the plugin featured in this post too

    🙂

    • Vincent - January 16, 2011 @ 4:55 pm

      @Mrinmay Bhattacharjee, I guess only blogs with podcast or offering downloads will use up that much of storage in wp-content.

      wp Time Machine do compress the directory in zip before uploading. I like it for the fact it will upload to a remote location automatically, and I will receive the files on my PC without downloading manually.

      I haven’t tried using cPanel full backup. Will explore this option. Thanks.

  5. Kartik@DailyTechPost - January 16, 2011 @ 6:29 pm

    Hey nice share mate…BTW I just wanted to ask you that does this plugin also backups comments..

    • Vincent - January 16, 2011 @ 9:10 pm

      It will backup your entire database, which includes the comments.

  6. Arun - January 17, 2011 @ 1:36 pm

    Can i Use ftp as service ???

    Please provide ftp procedure

    • Vincent - January 17, 2011 @ 2:07 pm

      @Arun, you can do that. Choose FTP instead of Dropbox at the wp Time Machine settings, then provide your credentials.

      It will only make sense though if you are using a remote ftp. If you were to use the same ftp where your blog is hosted on, then it defeats the purpose.

  7. tips for technology - January 18, 2011 @ 4:27 pm

    Thank you great share..I required the information for maintaining my blog backup …
    blog@ http://tips4tech.net

    • Vincent - January 18, 2011 @ 7:31 pm

      No problem, and be sure to grab the free 1GB for Dropbox if you’re using it: here.

  8. Saket - January 19, 2011 @ 4:13 pm

    Vincent, are you sure Wp time machine works for you? I’ve tried it but its not able to send files to Dropbox. I only get a success message but the file’s not there.

    (I’m hosted by Bluehost)

    • Vincent - January 19, 2011 @ 8:57 pm

      @Saket, it’s working great here. Maybe you can check the log to see if everything goes smoothly?

      Definitely worth the hassle to get this thing working, really gives me peace of mind.

      • Saket - January 21, 2011 @ 4:22 pm

        @Vincent, It doesnt log anything into the error_log file, does it?

        It shouldn’t be because of my server i think

  9. Lilia Lee - February 7, 2011 @ 7:09 pm

    This is so simple to setup and use, even for a non-Techie like me. I love it.

  10. Caffeine - February 7, 2011 @ 10:56 pm

    Helpful article.

    Can you limit how many backups are kept in Dropbox either with the plugin or by using a cron job to delete older versions? If so, how?

    • Vincent - February 8, 2011 @ 3:39 pm

      If you enabled time-stamped subdirectories, a new folder will be created every time a backup is generated.

      If it’s disabled, every time a new backup is generated, the old one will be deleted automatically and will be replaced by the newer version.

      Either you keep all the backups or only the latest version. It will be nice though if we can opt to keep the last 7 copies or something like that.

  11. MIchael - February 10, 2011 @ 6:28 am

    Thanks for your help. This is a great tool…
    I’m already sleeping better!

  12. zaferq - September 18, 2011 @ 4:52 am

    thanks

  13. Medifast Coupons May - April 26, 2012 @ 3:30 am

    I agree, this is such a wonderful tool. And you made it seem so simple! Thank you for sharing it.

  14. chy - June 21, 2012 @ 1:13 pm

    there are other sites protecting economical discount when compared to the sites who offer for sale these real Louis Vuitton Shoes. The situation however is that open public will marketplace a lv underneath fake manufacturers, maintaining it is genuine a lot more actuality this is a fake.

  15. Mahatab singh - August 29, 2017 @ 10:29 am

    wow this is amazing plugin for website backup. thanks for sharing this post.

Leave a Reply

Your email address will not be published / Required fields are marked *