How to Back-Up Your WordPress Site Consistently and Automatically

Last updated on

It doesn’t happen often, but it does happen. There’s a SNAFU with your web host, and they tell you that your website is no more. It’s gone. Kaput. Like Elvis, it has left the building. And worse, they don’t have a recent back-up of the data. Or worse still … they don’t have ANY back-up copies of the data.

Think it can’t happen? It can. And it does. But it doesn’t have to be that big of a problem if you’re prepared for the worst.

You Need to Keep Your Own Back-Up Copies of Your Website

Most web hosts do offers some sort of back-up plan, however, they also state that you should keep YOUR OWN back-ups of your site.

Bluehost: “Bluehost does not offer redundant or mirrored backups. Bluehost will run courtesy backups at our discretion. Any backups that Bluehost runs are in addition to our Terms of Service and are not guaranteed. Customers are encouraged to run periodic backups through the provided cPanel. Bluehost recommends that you store such backups off site on your local system.”

Hostgator: “You are responsible for your backups and web content. We create our own weekly backups on the shared servers, and we can restore from those. However, this is NOT a procedure you should rely on to keep your content safe.”

DreamHost: “At DreamHost, we know everybody’s data is important, no matter what plan they’re on. That’s why all our packages include full backup ‘snapshots’ of your data at various regular intervals (two hourly, two daily, and two weekly) … Of course, you should ALWAYS keep your OWN backup copies of everything of any importance to you no matter what. But we’ll do our best to make sure you never need them!”

Whether your host offers an automatic back-up service or not, the bottom line is you need to create consitent back-ups of your own data. It’s just good business practice; just like you make consistent back-ups of everything on your home and business computers. My computer is backed up every night (a lesson I learned the hard way).

Back-Up Your WordPress Database

Most of the important data in a WordPress site is stored in a database on your web host’s server. This includes data such as your WordPress site settings, posts, pages and comments. It also includes any settings for WordPress themes and plugins that you have installed.

What’s not stored in the database includes your WordPress core files, theme files, plugin files and image uploads. You’ll need to back-up these files separately.

There are several plugins that handle the task of create a database back-up. I’ve examined most of them and tested the ones that look most promising. Basically, we want a plugin that does the following:

1. It Should Create an Automatic Database Back-Up According to a Set Schedule – This is not a task that should be reliant on our memery to accomplish. It needs to be automatic.

2. It Should Send the Back-Up File to an Email Address of Your Choosing – Most back-up plugins will store the back-up file on your web host’s server, but that’s not quite good enough. We also want a copy stored somewhere off the server in case the entire server goes down or loses data.

Which plugin handles both of these tasks?

WP-DBManager created by Lester Chan

Here’s how to set up the plugin to create automatic database backups of your WordPress site.

Step 1: Install and Activate the Plugin – you can do this through your WordPress control panel. Simply click Plugins >> Add New in your WP control panel, and do a search for WP-DBManger. Once you find it, click the install link, and activate the plugin. If your server is not set up to install plugins this way, you’ll need to download the file at the link provided above, unzip it, then upload to your wp-content/plugins/ folders within your WordPress installation.

Step 2: Ensure Proper Settings for the Plugin – Once the plugin is installed, you should see a new module at the bottom left of your WP control panel named “Database.” Click on the link that says “DB Options,” and scroll down to the section on “Automatic Scheduling” (click thumbnail to the right).

How often you have your database backed up is a matter of personal preference. If you are adding new content to your site every day, then you should do a daily back-up. Otherwise, set the back-up schedule according to your own publishing schedule. Be sure to add your email address to the email field so the plugin will email the backup to you. If you like, you can also have the plugin optimize the database according to a set schedule as well. Is it necesary? Likely not, but since you’re here, you’d might as well set it up. It certainly won’t hurt anything.

Here’s another Tip: Create a free Gmail account, and have the back-up files sent to that email address. That way, the back-ups won’t take up space on your home computer. Also, if something happens to your home computer, you will still have the back-up stored in the Gmail account. Gmail is a great storage facility for your data.

Back-Up Your WordPress Files

Now that you have your automatic WordPress database back-up scheduled, we turn our attention to backing up your WordPress files. In this case, we want to create consitent and automatic back-ups of all the files in the following folders (click thumbnail for example):

  1. main WordPress folder
  2. wp-admin folder
  3. wp-content folder
  4. wp-includes folder

The simplest way to do this is with and FTP program, ideally one that you can set up to handle the task automatically. The FTP program I use is named SmartFTP. Unfortunately, SmartFTP is not free. It goes for $36.95, but I was more than happy to pay for it considering the features it offers, mainly the automatic transfer feature. The other issue with SmartFTP is it’s not MAC compatible, but I’m sure you MAC users out there have a comparable (if not better) alternative.

How often you backup your WordPress files is, again, a matter of personal preference. I do it once a week. And keep this in mind. The most important files to back-up are the files in the wp-content folder. This folder includes your theme files, plugin files and image uploads. If you lose those, it’s not so easy to restore them. On the other hand, the core WordPress files, wp-admin folder and wp-includes folder can easily be restored by simply downloading the latest version of WordPress.

Some Questions for Your

  1. Do you back-up your WordPress site(s)? If so, how often?
  2. Have you ever lost your WordPress site?
  3. Does your web host provide consistent, automatic and easily accessible back-ups? If so, what web host are you using?

About the Author (Author Profile)

Solostream provides Premium WordPress themes that are professional and easy to use. Templates suitable for personal or business blogs, websites and online magazines.

Comments (56)

Trackback URL | Comments RSS Feed

  1. Cheers Michael.
    I tend to stay away from plugins that automate backups. I fear that too many plugins can really slow your site down. (Haven’t really tested site speed with these types of plugins though)

    So I generally do it manually through phpmyadmin. Of course WP-DB manager is fantastic for handling this task and ideal for someone looking for an automated solution.

  2. sheshnath says:

    Nice and informative article, Thanks for this one, it will surely help me for taking backups of my blog.

  3. RamonaHapke says:

    Thank you for your comprehensive information.
    Yes, some years ago a lost my installations because of a server hardware crash. The backups were not up-to-date.
    I always backup my systems via phpMyAdmin before every WordPress update and for customers even before any plugin update. One of my providers (regional in Ratisbona/Regensburg) also backups data every day by using a cron job. It is for the worst case, he also restores. I can call him when sth. seems strange. Also another provider in Germany (not a very big one)provides a WordPress hosting for 5 Euro/month plus backup/restore for 3,33 Euro/month.

    Very useful for backups is the plugin “Adminer” by Frank Bueltge/Bültge. If somebody has no Confixx or other tool you can backup the database with Adminer.
    Frank is a German developer and moderates the German WordPress cummunity. His plugins are always up-to-date.

  4. mohit sharma says:

    very useful information i use smart ftp for backup and phpmyadmin for database backup. this is good plugin

  5. kholland says:

    Michael,

    I run manual backups every evening through my sites’ cpanel and then download a local copy when I’m done.

    QUESTION: Is running cpanel backups just as good as using this plugin? In other words, is it essentially the same thing?

    • Which plugin are you referring to Ken? WP-DbManager? if so, that only backs up the database. I believe a cpanel backup backs up everything on your server account, so probably a better option for you.

  6. LeslieNicole says:

    I was using this plug-in, but I read that this plug-in is not very secure. After being hacked 2 x in one month (don’t know yet if it had anything to do with this plug-in) I’m feeling very cautious. Still, it sure is convenient, so I’m going to look further.

  7. Anything to do with the .htaccess file scares the bejeebus out of me. LOL I installed DB Manager just now and got this error, of course: “Your backup folder MIGHT be visible to the public

    To correct this issue, move the .htaccess file from wp-content/plugins/wp-dbmanager to /home/moi/public_html/wp-content/backup-db”.

    I already use WP DB backup & the plugin backup. I guess I’ll call Hostgayor and see if they can help me out. LOL

  8. Gordon says:

    Hi Michael

    ‘Mike G’ above replied and said – “Don’t forget you need to test that you can recover from your backups”

    How would such a test be done to ensue your backup will work when you need to use it?

    Thanks again great info.

  9. Sibby says:

    VaultPress can take care of backing up everything automatically. This is a paid service from Automattic, the company behind WordPress.

  10. Lil says:

    Article and comments are very useful but DO NOT use this WP-DBManager plug-in. It has been hacked. It will ask you to move your .htaccess file (claiming that it may be visible to the public) then replace your pages with links pages for breast implants and the like.

  11. Justin says:

    Thanks so much for this post! I think it will be very useful to back up my blog on a weekly basis. My only question is a notice I received after installing the DB Manager: “Your backup folder MIGHT be visible to the public. To correct this issue, move the .htaccess file from wp-content/plugins/wp-dbmanager” to another area. Do you know the best way to fix this? Should the .htaccess file be saved on my computer?

    • Thanks so much Justin. Please refer to the plugin developer website for support on the plugin itself.

    • Hi Justin,

      To answer your question re that ‘error’ message. Download, via your FTP program of choice, the htaccess.txt doc found in the folder they mention.

      Then re-upload it to where they say (it’s your uploads folder within the plugin folder as I recall) – once done then ‘right click’ and rename the file on the Remote Server (i.e. your hosting account)from htaccess.txt to .htaccess

      You’ll know you’ve done it right when you refresh your Admin page and the warning disappears.

      Clive

  12. Gordon says:

    a None techie question

    So its easy to use the DB manager plugin and get auto delivery of the backup copy but

    How would i re-intall that backup copy if required?

  13. Akash Padhiyar says:

    nice Post..Thnk you for sharing…

  14. Michael says:

    Great article on this very cool backup utility. How would you compare it to BackupBuddy?

  15. One of my client sites is over 2GB, which is a problem for Linux shared hosting when making backups since the filesystem won’t support files over 2GB… Among all my clients I have to back that one up manually via FTP rather than zip. Any idea if there is a backup utility that will segment or span Zip files when they reach a certain size? That would really be handy.

    The old windows or command line zip utills did that back in the day when you had to span floppies and limit archive files to 1.44MB in size, and would name them file1.zip, file2.zip, etc…

  16. Jonathan says:

    Some great ideas on this post. I currently use the DBManager by Chan, and GoodSynch. I haven’t had any issues with GoodSynch at all. I use the FTP feature to backup my Wp-content folders, and then I have it scheduled to backup to my external harddrive. Probably a good idea to see if I can get a zip folder done through my hosting account though, I’ll have to check that out.

  17. Clive says:

    Hi I’ve found that ‘WP-DB Manager’ plugin by Lester Chan has never emailed me my backups. In fact it states that next scheduled backup will take place in October 2009 (5 months ago) which is odd and obviously a bug there somewhere.

    I’m now using ‘WordPress Database Backup’ plugin by Austin Matzko which seems to be v.popular and much used

  18. I use Cobian Backup to automatically backup the files from my site. It is free and will run a scheduled backup of an FTP site. It emails me the log when it is done so I know it worked.

    I use the WP-DBManager as you suggest for the database.

    I hope everyone heeds your advice and backs up their files and database regularly. It would be a pity for someone to lose all they’ve worked so hard to build.

  19. Hi –

    Aha, an automated FTP program. What a great idea.

    Thanks.

    Peter
    OurBroker.com

  20. Alex Webley says:

    Thanks for the helpful post Michael.

    I have been using the WordPress Database Backup plug in for some time with twice daily back ups sent to my email (Google Apps). With a filter set to file emails in trash which is only emptied (automatically) every 30 days.

    I had not been downloading the other stuff, but thanks to your article I now am. Being with GoDaddy, I think they have a good back up system, however I like to organize it myself too.

    My choice of FTP is FireFTP – an extension for Firefox. Personally I find it easier and faster to use than some of the others I have tried.

  21. Andre Kalis says:

    Thanks so much.Two birds with one stone. I’ve been agonizing about not backing up and not knowing how to back up for months and here you are – plain and simple. Second bird: Were the heck are my blog content files? It’s in the database, stupid!

  22. I had no idea Smart FTP had scheduling and automatic downloads – SMART.

  23. Hi Michael,

    Thanks for this – very useful. What I’d like to know is where the content pages are stored? They are not in wp-content. I’ve found the uploaded images but can’t locate the actual pages and posts. I’ve looked around all the directories in the main folder where WordPress is installed.
    As a result, if I do a manual back-up and save the contents of wp-content, I still don’t get all my content…

    • Michael says:

      Hi Lisa. My pleasure. The content for your posts and pages is stored in the database,so they are backed up when the database is backed up.

      Remember that with a databases driven website, you don’t have web pages the same way that you do with a static website. Read Blog Design 101 (Part 1) for more info.

  24. With 30+ client sites, I perform a weekly manual backup, and it takes about 7 minutes/week.

    First I create a new folder (YEAR-MM-DD) in my Website Backups folder on an external drive.

    Each site is installed in their own folder under a main “sites” folder. My host has a tool that lets me make a ZIP of the whole folder that will be saved to the root of my account. My second step is to initiate a backup of the SITES folder TO A ZIP.

    Third, while the ZIP is being built, I load phpMySQL selecting all MySQL databases and download it as a single ZIP file to the Website Backups folder.

    Finally, I FTP the large ZIP file (~2GB) to the Website Backups folder. I’ll keep the last 2-3 months’ worth and delete anything older.

    It’s not pretty, but it’s not so ugly I slack off and don’t do it. It also helps me make sure it is really working as well. before entering the Web Design field I was a network Administrator for 13 years and on more than one occasion our “automated” backups either didn’t do their job or were not backing up everything they were supposed to.

  25. Jim Hubbard says:

    The best backup that I have found is Bei Fen. It can backup your database only, site only or both.

    It can backup only when you say or on a daily, weekly or monthly schedule.

    It is infinitely easier to setup and use than WP-DBManager.

    And it is free.

    Serioulsy, Bei Fen rocks WordPress backups. Try it once and I think you’ll be just as hooked as I am.

    • Michael says:

      I did try Bei Fen. The problem I had with it is it does not send a copy of the back to you via email. It only send an email confirmation that the backup has been done.

      • Jim Hubbard says:

        That is true – and the “help” over there can seem like smartasses at times. Like when a user requested that very feature on their site(in the “Request Featurs” section no less), David (who I assume is in some way a part of the project there) said “With sending the files as attachments you probably mean the compressed version of a backup, or do you want to add around thousands of files as an attachment to an email?”

        He won’t get nearly as many helpful requests on his sight being a smartass as he would simply being nice.

        And, if “David” is not part of the Bei Fen team, his posting privileges should be revoked before he runs off users.

        On a completely separate subject….

        What I actually do to maintain emergency backups is to keep my web directories in my dropbox directory and point my web server to them.

        Then I have copies of my web directories on at least 3 machines (and in the cloud) should tragedy strike the server.

        I use Bei Fen to create my backups automatically – again to a directory in my dropbox directory – in case I want to roll back a change to a site.

        Thanks for another view on doing this though!

        • Michael says:

          What I actually do to maintain emergency backups is to keep my web directories in my dropbox directory and point my web server to them.”

          Now that sounds interesting. I’d love to hear more about that. What is a dropbox directory. I’ve never heard that term.

          • Jim Hubbard says:

            Go to https://www.dropbox.com/referrals/NTc4NzE1Nzk and you can get a free 2GB account.

            The software works on Mac, Linux, Windows and iPhone. It creates a directory called My Dropbox on each device that you install the software on and syncs those directories among all of your devices. (It even keeps recent changes in the cloud so that you can use a browser interface to roll back unintended changes.)

            No limit on the number of devices an you can (like I did) buy a 50 GB account.

            Also all data is backed up to “the cloud”.

            I love it! I use it for my root web directories and anything I just can’t stand losing or need on most of my devices (like KeePass to keep track of all my passwords).

            Neat thing is that I can edit my website files locally and they are automatically synced with the root directories on my server. No more FTPing things up after I edit them.

            Another neat thing is that my server root directories are backed up across many devices and backed up again when I backup my laptop or desktop PC. (Never can have too many backups ya know.)

            Next to Logmein, it is my favorite software/service.

          • Michael says:

            Excellent. Thanks Jim!

  26. kwatog says:

    on my vps, I have a script that runs on cron. it generates a zip file of the db, wp-content folder and wp-config.php and send it to my gmail account.

    but thanks for your post, i’ll make use of this method for my sites that sits on webhosts that do not allow ssh access.

    • Michael says:

      yes. cron jobs are a way to go, and a little advanced i think for the average user.

      if you know enough to be able to run your own server, it’s likely a snap, but for the rest of us shared server folk … not so much :-)

  27. Thank you for this article, I found it incredibly helpful!

    I am not the most technically minded, but have started blogging for my business, along with the website in an effort to increase traffic. Id be devastated if I lost it all!

  28. Thanks for that Mike. Good point.

Leave a Reply

No Theme Support Questions Please

We will not respond to theme support questions submitted via this form.. If you've purchased one of our themes or a Premium Themes Membership, please visit the Solostream Support Forum for support questions. To do so, login to the Solostream Member's Area, and click the link for the Solostream Support Forum.