'Blog Admin' Category

Admin :: New Home, New Name

This site, formerly known as ‘zebpedersen.co.uk’, has undertaken its third official server move.  Since the first post on Sept. 15th, 2010, the site has inhabited Uncle Meat – an HP DL380 G3 which was loud as hell,  Lumpy Gravy – a homebuilt PC which was much more civilised, and most recently Phaze III – a rented VPS on a 200 meg pipe (up from the 512k home broadband the original machines ran on).

That server grew to be slow as hell, and I’m serving more professional content now which means uptime is important, and the old box wasn’t cutting it, and was expensive. And thus we arrive at today – the old site, reborn on a new, faster, more reliable, cheaper server (named Thing-Fish), and with a new domain to boot. The original zebpedersen.co.uk will soon redirect to the new zebpedersen.com, my portfolio site, so update bookmarks etc… to the somewhat new zeblog.co.

Schedule WordPress Backups Using Cron

I was contacted a couple of days back by a reader who wanted to add my super simple WordPress backup program to Cron, the Unix task scheduler, to create automated regular snapshots of his site. Backing up my website using the program is something I normally do by hand as part of my general system maintenance routine, but the program is easily incorporated in to Cron to run on a timer. Completely by coincidence, I suffered a WordPress plugin failure within a couple of days of creating the Cron job, and thanks to my now daily backups I was able to restore from a 10 hour old snapshot with the minimum of fuss. (more…)

Super Simple WordPress Backup Program

Whatever you do with your computer, it’s absolutely vital to back up your data. Never is this more true than when you’re administering a website, where creating backups should be a well organised and regular procedure.

This site is no exception to that rule, so to help me out with my daily backups I’ve written a small program in the Python programming language which automates the process of archiving daily snapshots of my site. For peace of mind, I still prefer to launch and organise backups myself rather than use completely automatic solutions; this program helps make that process much quicker.


You can download the program by right-clicking here and pressing ‘Save As’/’Save Target As’.

If you want to download straight to your Linux machine from the command line, use wget:

$ wget http://zebpedersen.co.uk/python/wordpressbackup

The program is designed to run under Linux, but theoretically it will work on any Unix system (Mac OS X, Solaris etc…) with Python installed.


All you need to feed the program is the path to your WordPress installation (the directory containing your wp-****.php files). The database login credentials are borrowed from WordPress, and the backup is placed in a date-stamped folder for easy archiving.

Each backup contains a dump of your MySQL database and a tarball of your installation directory – everything you need to restore your site in case of a disaster. The backup will be created in the folder from which you start the program.

To launch the program:

$ ./wordpressbackup /path/to/wordpress/installation

For example, if your site is located in the directory ‘/home/randymarsh/web’, the command would be:

$ ./wordpressbackup /home/randymarsh/web

If you need help or more information, use the help & about functions:

$ ./wordpressbackup help

$ ./wordpressbackup about

Hopefully this little script can help out anyone else like me who only trusts a backup they’ve done by hand. Enjoy!


Street League 2011 – Seattle

Street League Skateboarding is back for 2011 – last year’s competition was awesome fun and they’ve changed up some of the rules for the 2011 competition.

What they’ve also done is host the clips on a server with a 300 page which lets you browse the .flv files available. This means you can download them for watching offline in VLC or your media player of choice.

I’m a big fan of street league and it’s awesome to see it back on the air!

Here’s the link for the ESPN site, and here’s where you can grab the files for download.

Or, if you’d prefer just to watch here the videos are after the break.

[UPDATE: Stop 2 available here]


Web & Coding Tools for Mac OS X

Here’s three essential tools for anyone who uses Mac OS X for coding or remote admin.

FTP: FileZilla

If you work on a remote machine of any sort the chances are you’re going to need to send files to and from your local terminal.

FileZilla is not just the best open source FTP client I’ve ever used, it’s the best FTP client I’ve ever used period – it’s fast, free and dead easy to use, as well as being available for all three major platforms. I can’t recommend the Mac OS X version highly enough – it’s essential.

You can grab the latest version of FileZilla here, and remember, it’s donation-ware so if you love it, hit up PayPal and help out.




Royal Wedding iPhone 5 Birth Certificate

Sure fire way to increase traffic.


Instagram has been added to the sidebar <<<—- (over there). The pictures are really pretty cool I think, especially when you take pictures of old Nintendos or guitars.

I first tested the app on an iPhone 4, and wasn’t expecting it to work too well on my old 3G, but in actual fact it loads faster and is more reliable than the built in camera app. The processing time for each image is pretty decent too, considering the now ancient CPU the 3G is rocking. Good times.

Indexhibit Thumbnail & Upload Error [Solved]

A short post which might save you an hour or so banging your head against your computer screen.

I’ve been setting up another site using indexhibit for a CMS – it’s a pretty standard installation, using PHP, Apache2 and MySQL. Database creation is identical to WordPress and setting up the system is simple – however once everything appeared to be working, I hit a really really frustrating and fundamentally crippling problem.

The Problem: Unable to upload pictures to exhibits

Pictures upload to the server, but the CMS does not ‘see’ them – you don’t get thumbnails, you don’t get the option to upload more images, you can’t use them in your exhibit. Basically, this renders the whole site useless.

The Solution:

Install GD. GD is a PHP extension which is used to process uploaded images – you can read more here, should you so desire.

To install, type the following at the command prompt:

$ sudo apt-get install php5-gd

Usual apt installation process will occur ( After this operation, 602kB of additional disk space will be used.Do you want to continue [Y/n]? ), and after that you can restart Apache – it will reload the config files as part of the install, but I’d rather be safe than sorry.

Hopefully this can save you a couple of frustrated hours. Enjoy.


A first look at Animatable from Andy Clarke on Vimeo.

The browser-inhabiting anti-Flash-based anti-Flash. Looks very interesting and simple to use.

For what it’s worth, the performance of the sample animation on my iPhone 3G was very poor, however I’m sure things speed up on more modern hardware. Exciting to see how this one turns out.

Adding a Custom Error Page when Hosting Multiple Sites Using Apache

Another optional extra you might want to consider when hosting multiple sites, or just when working with subdomains, is a custom error page.

Using the more basic configurations detailed in previous tutorials, you may occasionally find odd results being returned to your clients. For example, if someone were to simply type your server’s IP into their browser, or spelled a subdomain incorrectly, Apache2 will serve them up the first site it finds in its configuration path. If you’re hosting multiple sites, this means that a totally different site might be returned, which doesn’t exactly look professional.

Here, I’ll show you how to easily counter this problem, by creating a custom error page for your server.

[If you’re not familiar with Apache configuration files, read one of the tutorials linked above for more info.]

Step One

Create your custom error page and save it as ‘index.html’. In this example, we’re going to create the ‘index.html’ file at /home/randymarsh/errorpage/index.html.

This page could just be an image or some text, or you can write a redirect to one of your hosted sites or their subdomains. As long as it’s called ‘index.html’, you can do what you want here.