The daily haiku journal I publish, tinywords — which I like to refer to as “the world’s tiniest magazine” — has resumed publication. I’m working on some enhancements to the site which I hope to be able to announce in the next couple of weeks.
I’ve ended a short, ill-conceived flirtation with WordPress as the content management engine behind tinywords, and returned to the custom PHP-MySQL engine I built for the site. WordPress is a great blogging tool (I use it for the Tweney Review) but it wasn’t well-suited to the particular needs of my haiku zine. Unfortunately, I had about 6 months’ worth of haiku, along with their comments, that had been published on the WordPress site. I also really liked the design of the WP site, which was based on the lovely Manji by Khaled Abou Alfa.
So, I spent a few half-days last week porting the design, the haiku, and the comments from WP to my own system. Moving the haiku was easy; moving the comments, a little trickier. That’s because WP’s comments table was keyed to posts in its own table, which obviously have different ID codes than the haiku in my own database’s table. The process wasn’t pretty (export to CSV, import into OpenOffice Calc, munge data, clean up, rearrange columns, export back to CSV, then import into the new database) and took far longer than I thought it would. I hope I never have to do that kind of thing again.
Two lessons learned along the way:
1. Always test your SQL selection statements before using them in a “DELETE FROM” query.
2. Always make backups of your tables before running a “DELETE FROM” query that might, say, accidentally delete every last row in said table.
Many, many thanks to Scot Hacker at birdhouse hosting, which hosts tinywords, for restoring my accidentally emptied table from a regular nightly backup.