0

I have a travel blog which I originally wrote in WordPress. Since then I've migrated it to a Jekyll site, then eventually a Hugo site which I published on Github Pages. Now I want to put it back on WordPress but seem to have misplaced any prior WordPress backup of it.

How can I get the site migrated back over to WordPress without manually importing each post one at a time? WordPress plugins for this are almost non-existent. Here are the things I have tried so far:

  • a plugin to import RSS - tried this with the existing Hugo index.xml - for some reason it only contains the last 15 posts
  • import html plugin - this got fairly close, but would require an insane amount of code/content cleanup on every post

I have the posts (around 150 of them) available in the following formats:

  • One markdown file per post, all in one folder - each file contains YAML front-matter
  • Individual html files per post, each named 'index.html' inside a folder with the post name. Example:
    • Blog Post 1/index.html
    • Blog Post 2/index.html

I'm working from linux as my desktop daily driver. I'll probably use some bash commands for file cleanup before importing, as needed. But I really want to find a way to programmatically migrate the site, automating as much as possible. I've Googled this a hundred ways, but still haven't found any pre-built solutions that weren't either 10 years old or made for a different scenario. Help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.