Mind to Code

I code and talk about it

New Ruby Gem to Import a WordPress Site to RefineryCMS

Hi everyone,

as I’m about to do a relaunch of this very blog based on Ruby on Rails and RefineryCMS I needed a tool to get my old posts from WordPress into the new system.

So I forked the refinerycms-blog gem and started extending with some rake tasks. It took quite a while to get some productive code, as I deliberately took my time to sharpen my ruby skills by doing a clean architecture and writing a comprehensive test suite. Usually, for some throw away, one shot code (importing the dump once), that would be too much trouble. But it was fun and everything was coming together quite nicely.

The guys at resolve, the creators of RefineryCMS, were getting scent of my work and told me, they were interested in this project, as quite some people were requesting this feature. So I decided to make this thing public and extract it in a separate gem (by request from refinery).

Now, finally I present you my very first gem: refinery-wordpress-import!

Yeah, I know, the name could have been more creative. But at least it describes, what the thing does.

So, if you are a Rails coder and have a WordPress blog: Really – take a look at RefineryCMS and try out this gem to get your data migrated easily!

Should you run into trouble or find a bug withing this gem, please drop me an issue on the projects github page. So far it has imported several blogs successfully, but you never know what further surprises WordPress holds for us. The more people throw their blog dumps at this gem, the more stable it gets and the more edge cases I can include in the project.

So long,
Marc