Rediscovering the Past: Reviving My Old Drupal Blog with a Simple SQL Query

A recent stroll down memory lane led me to an archive of my old website, It was a blast from the past, an archive with the remnants of my 2008 Drupal-powered blog. The trip down nostalgia lane inspired me to resurrect the site as an archive on, but I quickly realized that the content needed a spring cleaning, there was a lot of junk I didn’t want to keep! With a simple SQL query, I managed to extract the essence of my old blog, capturing the titles, bodies, and dates of each post.

SELECT t1.nid, t1.vid, t1.title, t2.body_value, FROM_UNIXTIME(t1.created) from `node` as t1 left join `field_revision_body` as t2 ON t1.vid = t2.revision_id where t1.type = 'blog'

This simple SQL snippet extracted everything I wanted to keep from the MySQL database. Titles, bodies, and dates were all I needed to keep the memories alive!

You can read my old Elf Knows IT posts here.

The old Elf Knows It logo!

You may also like...