Rick Hurst Web Developer in Bristol, UK


Category: wordpress

Search and replace on a large file on OSX using Sed

My code editor of choice, Sublime text 2, crashes when you try to do a search and replace on a large file. This makes it difficult to do a search and replace on a large sql file, as I sometimes need to do when moving a wordpress site from one domain to another

The command-line tool sed can be used instead like this:-

sed -i '.backup' 's/olddomain/newdomain/g' wordpress-backup.sql

This makes a backup of the original file, then updates the original

Redesigned Site for Kudos Business Technologies

Kudos Business Technologies | LED Lighting and Sustainable Technology for Business

A couple of years ago I created a website for Kudos Business technologies. The site has been fairly dormant for a few years, but as I am now “involved” with Kudos (more on that at a later date), recently I decided to redesign it and rebuild with wordpress 3, as the bespoke CMS I put in place before using using cake PHP wasn’t nearly as user friendly as the tried and tested wordpress. I’m really pleased with the result, both from a technical and aesthetic point of view.

I’m looking forward to expanding this site – the products database on the Kudos site is now quite out of date, and there is a much larger range of (mostly LED lighting) products over at the Kudos retail site. The Lightplanet store is hosted on a 3rd Party system which doesn’t have a decent product export api, so I’ve actually written a screen scraper to extract data from the lightplanet site to use in our own database. This will allow us to collate more technical data for the products, which can be used on the kudos site. Phase II is to create a comprehensive Products information site from this data, including an API to allow us to integrate with 3rd parties.

[update 2014 – links removed as these sites no longer exist]

Tate Movie Project

Earlier on this year I was fortunate enough to be asked to help the Aardman Digital team out on the companion website for the Tate Movie Project . This was one of the most fun and technically challenging website builds i’ve worked on. Working as part of the team, along with several other Bristol freelancers, I helped integrate the cakePHP site with wordpress and vanilla Forums. This was also one of the largest site builds i’ve worked on – multiple flash developers, PHP developers, designers, animators, front end developers and producers, all coordinated by subversion, unfuddle and the biggest wall of printed out screen grabs i’ve ever seen!

Sitting on the fence – Why I sometimes choose not to use Plone in favour of Drupal or WordPress

As an experienced Plone front end developer, people are often surprised when I often decide not to use Plone, in favour of something like Drupal or WordPress. I thought it would be useful to explain why and how I make this decision. I know some of these points won’t be popular in the Plone community, but they are based on experience, and think this blog post will be useful to people deciding whether to use it or not.

Plone is complex
From a development point of view, Plone is a complex piece of software, at least compared to something like WordPress. I’m not going to go into specifics here, but for someone like myself who is primarily a front-end developer, sometimes I can lose days trying to add a simple custom feature, that I know I could create in hours on a php based site, probably just with a few lines of code in the template (a practice that is often frowned upon, but usually harmless and more importantly gets the job done). However much of this is down to my skillset and understanding (and probably my natural abilities to a certain extent) which brings me on to the next point.

Development resources – a chicken and egg situation
I have to hold my hand up and admit to being a bit of a “web monkey” when it comes to development – i’m self-taught, beginning with hacking around classic asp and php scripts and moving onto object orientated programming only in the last few years. With Zope and Plone the entry bar is higher – there is a whole framework to learn if you want to develop custom features, which is a good thing from a maintainability and system architecture point of view, but there is a significant time investment involved for someone wanting to transfer from something like php. Even an experienced Python developer will have some learning to do to get to know Zope and Plone.

This means that I struggle to find local freelance resources to work on a large Plone project with me. I also struggle to find sysadmins with zope/plone experience, and not being a sysadmin myself have found myself in a few hairy situations. I know of at least two ventures that have got into difficulties because of resource issues – I think partly because Plone can be a victim of it’s own success – there are lots of Plone developers, but they are all busy!

Plone requires specialist hosting – or rather you can’t run it on the majority of locked-down budget shared hosting. Many of my clients already have hosting arranged and don’t want to move, so something like WordPress suits their needs better, for a simple site.

Overkill for simple sites
Sometimes a site only needs to be dynamic for the sake of a blog/ news section – I find plone is overkill for this, and often prefer to go with something more lightweight, even (gasp!) a bespoke CMS when I need to bolt extra functionality onto an existing site, and there is no budget for a rewrite.

So when would I use it?
Without a doubt Plone makes a fantastic intranet, out of the box. I eat my own dogfood here – I use an unmodified Plone 3 site for my own company intranet and document management system. Drupal/ WordPress do not even appear on the radar in comparison for this task. I would also use it for any site/ application that has a need for complex workflow, membership and groups.

Lastly, i’m happy to use it for any project where I can team up with an experienced zope/plone techie to help with the more low-level stuff. I was recently blown away by seeing how an experienced Plonista at Team Rubber quickly dealt with some temporary extremely high read/write traffic on a Plone site by firing up a whole set of zeo clients on amazon EC2 – a scenario that i’m sure would have been a nightmare to deal with on a drupal or wordpress site, and i’d be equally out of my depth without help.

In summary
I hope this is useful and doesn’t upset the Plone evangelists too much. Plone is a serious, well architected, secure system that leaves the competition standing in most cases. I think by “competition” I am talking about proprietry CMS and intranet systems that cost ten or hundreds of thousands of pounds, not the likes of Drupal or WordPress. If you don’t want to do much customisation it makes a good choice for smaller projects, but if you do you are going to need a developer (or invest in growing one of your own), who is a. available, b. you can afford, otherwise you might be better to go with something else, with a lower development entry level.

archived comments

This is a nice write up. Sounds completely reasonable to me.

Kai (a Plone developer)

Kai Diefenbach 2009-05-08 11:20:57

True words..

I use plone for my intranet/dms, too. Maybe u can share your concepts/ideas or how u use it and for what..would be cool.


Gomez 2009-05-08 12:06:43

I agree, right on down the line. And if you have not already, you should consider blogging about how you’re using Plone as a DMS.

Rose Pruyne 2009-05-08 13:36:19

Great summary of everything I have been through since deciding on Plone at my day job about a year ago.

I don’t think even the most fervent Plone fan would advocate using Plone for everything. (Though I am sure there are people skilled enough to customize it to point will work for anything.)

Our major problem has been what to use when Plone IS overkill. We are a 3-person team and also learning Python at the same time. We are a little hesitant to take up another new framework (like Django) but at the same time it doesn’t seem to make sense to have some stuff on PHP and some stuff on Python. (And 1 of our team members would have to learn both.)

Anthony Bosio 2009-05-08 13:50:16

@Anthony yes, it doesn’t make a lot of sense to span php and python/zope/plone, unless like me you pick up different types of work from different clients and knowing both is quite useful. I guess Grok http://grok.zope.org/ would be a sensible choice in your situation because it keeps things python/zope 3

Rick 2009-05-08 13:57:45

Great, thoughtful, piece, Rick. If all you want is a few static pages and a blog, Plone is indeed overkill. The good news is that I think you’ll see the learning curve getting smoother over the next year as we simplify the content types, theming and page layout stories. I think this will put a lot more power into the hands of folks like me who haven’t mastered all of Plone’s innards.

The Plone community has learned a lot from both its successes and its mistakes over the past 8+ years, and we have a lot of great innovation in the pipeline.

Jon Stahl 2009-05-08 15:12:18

Why do you think Plone evangelists would be upset by this? I think most of them would (or at least, should) agree whole-heartedly with this analysis. In my opinion, Plone doesn’t even compete with WordPress and barely so with Drupal. As you said, – “overkill for simple sites”.


Martin Aspeli 2009-05-08 15:36:49

@Martin I guess the point I thought might be controversial is the bit about “getting into difficulties” with a plone site, by which I mean either a situation where a site stops altogether working one day (e.g. because of a problem with a corrupted ZODB or something like that), and you can’t get it back online without external help or a project becomes stale because a developer leaves and you can’t find anyone to replace them. I know this could potentially put people off using it.

Rick Hurst 2009-05-08 16:18:04

Fully agree, I use Django and CherryPy for simpler sites as my staffs will be still in Python environment. Switching different languages between projects can be counter-productive.

Michael Ang 2009-05-09 03:12:33

Good article. I agree with your opinion.
I quoted your point of view in my Japansese blog post.

Aardman.com goes live

I was really chuffed to be asked to help the aardman online team out with the build of the new aardman.com site. I took the supplied photoshop designs and created HTML/CSS templates that were then handed over to be integrated into the CMS. I’m currently doing a lot of freelance work for digital agencies and I haven’t been able to talk about the websites i’ve been working on, so it’s great to be able to shout about this one!

aardman.com website screengrab

Too Old To Skate again

I’ve recently revived my skateboarding blog after leaving it for over a year, I won’t repeat my reasons for doing so here, as it’s all on that site. It’s another wordpress blog – migrated from the old blogworks xml blog using RSS import. I created a wordpress theme based on the old site – not quite finished- and I haven’t copied the comments over yet – i’ll need to write something to do that manually unfortunately. I also have a load of static content, photos and video to move over too at some point.

gmail, akismet and spam empowerment

all my personal mail now directs to my gmail account. Gmail seems to do a very good job of filtering out the spam emails as hardly any get through. When one does get through I like the way that there is a “report spam” button. This makes me feel empowered about binning those tempting offers of “life” enhancing pharmaceuticals, and takes some of the chore out of it.

I like to think – rightly or wrongly – that because I have proactively “reported” the spam back to google, their anti-spam machinery immediately takes note and stops any other gmail users from recieving the same piece of spam, either from the same source or containing the same content.

I get a similar feeling of usefulness when I report comment spam back to akismet (via my wordpress akismet plugin) – I like the fact that because someone tried to leave comment spam on my site they are immediately blacklisted by all the other blogs that use akismet, making my site more like a honeypot to trap spammers rather than an unguarded doorway for them to try and sneak into.

Hooray lots of comments at last!

Thankyou very much for the unprecedented amount of comments I found in my moderation queue over the last few days. Very informative, but just so you know I don’t need any of the gambling facilities or drugs you all recommended. I’ve just activated Akismet to see how that goes – I was very impressed that it comes as standard with this version of wordpress (2.0.3). All I had to do was sign up at wordpress.com to get an api key.

OK, it’s time to categorise my blog posts

this is the internet equivalent of trying to organise my CD collection – wait- that’s not too difficult, i’m giving most of my cd’s to a charity shop as I prefer digital only these days. I think my “readers” are getting a bit confused when I jump between posts about coffee and posts about geekery. no. those two go together perfectly. Anyway, i’m going to add some categories, and try to retro-categorise some of the old posts over time. RSS subscribers may see old posts reappaer for a few days/weeks/months/years

hypothecate is now (also) www.rickhurst.co.uk

so if all has gone to plan, my hypothecate.co.uk RSS feed should have burst back into life and anybody subscribed to my old RSS should now be reading the feed from www.rickhurst.co.uk, my new personal blog / portfolio site, running on wordpress.

so lets get this right , I spent hours and hours migrating hypothecate to plone then binned it and went for wordpress instead? yep. For the last six years or so I have always used (much appreciated) free webspace from people I know, but this always tied me to a platform – first ASP, then zope/plone. Now I have another personal project running on Plone (www.dfrskatezine.com – ironically currently offline while I migrate it from plone 2.1 to 2.5), I thought I would stump up for some paid webspace so I could run some php/ mysql stuff without relying on favours and harrassing people to install and configure stuff for me.

The new site has a bit of a portfolio on it, as I am pimping myself for a bit of non-plone freelance work (out of hours – i’m still happily esconced by day ploning away at netsight hq), so any bits of web development work you need doing, contact me and I might be able to help you out, and you might be able to help me replace my dying car 🙂

Now I have working blog software again, I might even start posting a bit more often – still on the same theme – web technology with random inane drivel thrown in.

The old site will eventually redirect here, and I will do my best to not leave any dead links, by setting up some redirects. In an ideal world I would retro-categorise all the imported content on here.

As for quills etc have I completely given up? no – quills should make an appearance on the skate site in the near future.