How to Automatically Backup a WordPress Blog

The other day I had a friend ask me for a best practice in backing up his self-hosted WordPress blog. At some point his blog crashed and he lost just about everything. This is no good, especially when backing up and restoring WordPress has become so easy!

I follow a rule of data security that no data is secure until it lives in three different locations. For my blog that looks like this.

  1. Original file on my computer
  2. Copy on my portable external drive
  3. Copy on Drobo as the archive

The fail here is that at any given moment, two or three of these might be in the same place. If I’m at home with my laptop, my portable hard drive and my Drobo, and my apartment blows up, I’m done for. Your third space should be someone in the Cloud or some other safe online backup location away from your other backups.

For my blog it is much easier. I use two plugins, WP-Database and UpDraft to do daily and weekly backups of my MySQL database and the actual files behind my blog. In addition, my host provides daily, weekly and monthly backups.

Here is my backup structure.

Most hosts will only backup your website files, not your database. They leave this up to you. But with a blog, all your most important content is probably the posts which live in the database! Let’s learn how to create a fail-proof* blog backup. Continue reading

WordPress Experts, I Need Your Help!

For the last few months I’ve been having issues with pop-up ads showing up on my blog. Originally I thought it was a bug with my new favorite commenting system, @LiveFyre, but that was ruled out. They were even kind enough to look around my blog for the problem and couldn’t find it.

I’ve done just about all that I can think of. I manually went through my WordPress database cleaning out extra tables and entries down to the bare essentials. I got rid of all my plugins and themes, deleted every orphan database entry, wiped my WordPress install and even got my host involved.

They did some searching and twice found an iFrame with malicious code injected in it. They removed the malicious code, twice and the problem stopped, before coming back each time.

I did my own tests, Acunetix, Norton, SiteLock and M86 security scans all came back clean. One of my Twitter friends, @TheDigitalNinja, did his own scans and found nothing. Continue reading