Radiant to WordPress Conversion

First I had to backup my database from Heroku — so I created the database in PostGresSQL.

heroku pgbackups:capture
curl -o latest.dump `heroku pgbackups:url`
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d booher_blog latest.dump

Armed with that and the handy Induction I then needed to get my data into a format easily imported by WordPress. There is probably a standard way to do this, but I didn’t have time to find the efficient way. The first place I did look was the wordpress import data page, which led me to the right plugins. Then I was planning on running a command like:

COPY products_273 TO '/tmp/products_199.csv' DELIMITER ',' CSV HEADER;

It turns out that Induction has a great export tool to easily get me a new CSV file, but I had to make a new join table:

CREATE TABLE for_wp2 AS SELECT pages.title, page_parts.content, page_parts.name, pages.updated_at FROM pages, page_parts WHERE page_parts.page_id = pages.id;

Then I imported this via the wordpress-importer plugin. I used radiant “type” as a category and am going for the quick and dirty solution and figured I can manually copy over assets as opposed to creating a wget script to upload them. Wish there were an automated tool for this, but a little database knowledge is all that’s required.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *