Rediscovering the Past: Reviving My Old Drupal Blog with a Simple SQL Query
Just recently, I took a trip down memory lane and revisited my old website, https://elfknowsit.com. It was like stepping back in time, a treasure trove of my 2008 Drupal-powered blog. This nostalgic journey sparked the idea to bring the site back to life as an archive on ekayi.com. However, I quickly realised that the content needed a bit of a tidy-up – there was a lot of unnecessary stuff I didn’t want to keep! Using a simple SQL query, I was able to extract the heart of my old blog, capturing the titles, content 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.


