Show HN: I made a service to convert WordPress blogs to Hugo

  • That's pretty cool! I ported my own WP blog to a static site generator (my own but with a format inspired by Hugo) a while back and hacked together a script with wpparser and some custom code to spit out markdown (it was a while back but I think just regexes). It got me the bulk of the way there but I still had to go through every page and tweak it to get everything just right. Would happily have paid $150 to avoid that.

    Are you keeping URLs stable? That was tricky for me IIRC, along with RSS.

    (The very trickiest bit was probably specific to me. I still have inbound links with the page in a "/?p=3" kind of query param, which I think was the WordPress default 20-odd years ago. I didn't want to make the root URL for the site non-static to handle that, so I wound up putting some JS in my index page template that checks for that kind of thing. If it spots it, it changes window.location to a specific URL that is delegated a Flask site that knows where to redirect people. Link in bio if anyone wants to see how it works. I should probably blog about it sometime!)

  • I may be wrong here, but I understood Hugo sites to be static sites, therefore not supporting comments, for example. How does your tool handle migrating a WordPress side with comments to a Hugo site?

  • Thanks for sharing @symkat, love seeing developer side projects.

    Was curious why you picked Hugo over something like Astro. I'm migrating a site off of Jekyll and have found Astro has a lot of interesting features if I want to use them but is at its heart a static site generator and seems to be a pretty easy lift to migrate to. Haven't done much evaluation of Hugo yet.

  • The real money is in converting sites with plugins and retaining the functionality which in many cases isn’t static. The copying of data to another tool is the easy part.

  • And how do I upload an image of my cat to my all new Hugo site?

    WP lets me drag/drop or upload media very very easily. Has done for years.

    Hugo? or indeed most SSG's?

  • Isn't this a bit deceiving to call this "WordPress 2 Hugo"?

    Because isn't this just "WordPress 2 Markdown".

    Unless I'm mistaken, this does not recreate your WordPress theme/template to be used in Hugo (nor nothing specific to Hugo).

    It's just exporting your blog posts from WordPress database into a Markdown file format.

    Note: still very useful, I just find the name confusing.

  • WordPress is not just content - it's plugins such as WooCommerce, GiveWP, email marketing, BuddyPress, membership plugins, etc.

  • Part of me was really hoping this was going to be for the Hugo interactive fiction game engine [0]

    0: https://www.ifwiki.org/Hugo

  • That's a great tool! When I migrated from WordPress to Astro before, I used my own custom script for the migration. I think having tools like this is very convenient and useful.

  • Does it handle themes, plugins, etc., as well? Thx.

  • $150 haha. Wtf.

  • Good. But I do wonder why we're flooded with "services" like that when a simple open-source Python script could do this. $150 FFS. I hope you have clients but the open-source dev inside me is dying a bit.

    Edit: 413 Request Entity Too Large.