Backup Your Wordpress Database

Written by Aeriff | Saturday, May 5th, 2007
, , ,

Too often this happens to everyone. Here’s the scenario – You’re writing your brand new post, you’ve just published it and you’ve put hours of work into it and you’re proud of your efforts.

An hour later your host/provider has a server fart and your database and all your hard work goes down the drain. Your instant reaction is most likely rage.

Your first thought is most likely: I can’t be motivated to write it again, so I’ll just sit back and wait until the urge builds up to rewrite the post. “there goes all my hard work!” And to think all of this grief could be saved with 5 minutes work. Here’s a few methods to save you pulling your hair out:

Method One – cPanel

If you happen to be using a host that has cPanel, you can find the script I have written below to be quite useful for backing up your Wordpress database (or any other database for that matter, which is why I love it because it is not restricted to Wordpress). After you have downloaded the file, rename it from a .phps to .php to be sure the script will be executable. This step is absolutely imperative.

Download The Script

Security Warning

Now using your favorite FTP client, upload your newly created file In the directory under public_html/ or www/. I emphasised that because it is absolutely critical that this is where you upload it, otherwise you will be left open to someone being able to download your database information. And now we’re ready to roll onto the next step.

Now presuming you’ve either created a new PHP file or downloaded the file and renamed it, you need to login to cPanel and find the Cron Jobs icon. If you’re having trouble finding it, reference this image for help. Note that the image you say may differ to your cPanel interface.

Once you have found it, click it (duh) and youll be greeted with two buttons: Standard or Advaned. For now, choose standard and you’ll be greeted with a few boxes and inputs. See this image for an idea of what you need to put in all these boxes. The settings I have selected in this image are that my backup will be emailed to me every day at 3am (Server Time). If you would like to change this, simply do so by using the boxes. If you have trouble understanding what to do, don’t hesitate to leave a comment or email me.

Method Two – Wordpress Plugin

So there’s many great plugins out there for Wordpress which can do everything from add ajax goodness on pages to backup your database, which is exactly what we want.

For this tutorial, I have used WP-DB-Backup which was originally developed by skippy.net but was since abandoned and taken up by Austin Matzko and has since been rereleased for WP 2.1. Simply head on over to the WP-DP-Backup page, download the plugin and read the simple installation instructions. I would repost the incstructions here, but you can simply view them after you click the link. I myself have not used this plugin, as I am a faithful user of the above mentioned Method One.

Method Three – Wordpress Internal Backup

As far as I can tell from reading and watching a short video, this method makes the above mentioned Method Two of using a plugin obsolete (although having not used the plugin myself, it may offer extra functionality that the Wordpress Backup Tool does not). To save me explaining this method, a video on TubeTutorial which can be viewed via this link explains the method in great detail.

Conclusion

So there’s three methods to hopefully save you some grief in the long run if you do happen to lose your database(s). Just a quick shout out to the guys and girls at TubeTutorial for the use of their video in Method Three which is part of their series: 7 Essential Wordpress Hacks. It’s well worth a look.

If you feel I have missed anything in this guide drop me a line in the comments or use this revolutionary new technology called Email and get in touch, stranger.

Thanks for reading my first article on Attackr! If you think this article can be improved, please leave a comment.

Share and Enjoy:
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon

Related Posts:

2 Responses to “Backup Your Wordpress Database”

  1. Wordpress at Kaizenlog Says:

    [...] Backup Your Wordpress Database By Aeriff Too often this happens to everyone. Here’s the scenario – You’re writing your brand new post, you’ve just published it and you’ve put hours of work into it and you’re proud of your efforts. An hour later your host/provider has a server … Attackr.com – http://www.attackr.com [...]

  2. Sneha Gupta Says:

    Hi,
    I am very glad to you. your information is too good.

Leave a Reply