Updating WordPress? Backup first!

I’m sure I’m not the only one who has been a little slack on occasion when updating their version of WordPress and not doing a backup. It sounds such a stupid thing to do, especially when you think about the time you’ve spent working on the site and the time you may well need to spend fixing it!

One of the things that I hated was doing an ftp download of the site. I never got on with backup utilities very well as I wanted to be in control. So, a few years back I realised there was a far simpler method to maintain backups using the Terminal in Mac OSX.

ssh username@yourdomain.com 
cd httpdocs // or whatever your WP root directory is
mysqldump -u username -p database > backupdatabse.sql
[Enter password]
tar -vcf backupfilename.tar .

And that’s pretty much it. It creates two files in your WordPress root. You can secure copy (scp) through the terminal if you want or download using ftp. Either way, the above takes very little time to do and gives you the opportunity to restore things to how they were if it does go horribly wrong.

Ubuntu Linux Installed

So it all started with Windows 95 back in 1996, then Windows 98, then XP. After a quick dive into Fedora, it was over to Mac OS X. After going from Panther to Leopard, with a minor foray into Windows 7 using Parallels, it was off to Snow Leopard

And then along came the Ubuntu flavour of Linux. Very quick to launch, not too hard to learn and I get to (start to) understand the inner workings of an OS. I love it.

One quick test I did was compare Moodle on Windows 7 and MySQL with Moodle on Ubuntu running PostgreSQL. 5-10 seconds per page load on W7. 0,5 or less on Ubuntu. And the Ubuntu Linux machine has a lower spec!

This is one OS I’m going to stick with.